myPreviewActor->VisibilityOff();
myPreviewActor->SetMapper(myMapper);
- vtkProperty* aProp = vtkProperty::New();
float anRGB[3];
- anRGB[0] = GetFloat("SMESH:SettingsFillColorRed", 0)/255.;
- anRGB[1] = GetFloat("SMESH:SettingsFillColorGreen", 170)/255.;
- anRGB[2] = GetFloat("SMESH:SettingsFillColorBlue", 255)/255.;
- aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
- myPreviewActor->SetProperty(aProp);
+ vtkProperty* aProp = vtkProperty::New();
+ GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
+ aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
+ myPreviewActor->SetProperty( aProp );
aProp->Delete();
vtkProperty* aBackProp = vtkProperty::New();
- anRGB[0] = GetFloat("SMESH:SettingsBackFaceColorRed", 0)/255.;
- anRGB[1] = GetFloat("SMESH:SettingsBackFaceColorGreen", 0)/255.;
- anRGB[2] = GetFloat("SMESH:SettingsBackFaceColorBlue", 255)/255.;
- aBackProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
- myPreviewActor->SetBackfaceProperty(aBackProp);
+ GetColor( "SMESH", "backface_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 0, 255 ) );
+ aBackProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
+ myPreviewActor->SetBackfaceProperty( aBackProp );
aBackProp->Delete();
myVTKViewWindow->AddActor(myPreviewActor);
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
(SUIT_Session::session()->activeApplication());
myIsPoly = false;
mySimulation = new SMESH::TElementSimulation (anApp);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
// verify nb nodes and type
myNbNodes = nbNodes;
// set selection mode
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
myBusy = false;
mySelectionMgr->clearSelected();
mySimulation->SetVisibility(false);
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
bool aNodesOK = false;
if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
}
mySimulation->SetPosition(myActor,aType,anIds);
+ SMESH::UpdateView();
}
}
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
SelectionIntoArgument();
}