- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
bool toCreatePolyedrs = myCreatePolyedrsChk->isChecked();
if ( myPattern->MakeMesh( myMesh, toCreatePolygons, toCreatePolyedrs ) ) {
mySelectionMgr->clearSelected();
bool toCreatePolyedrs = myCreatePolyedrsChk->isChecked();
if ( myPattern->MakeMesh( myMesh, toCreatePolygons, toCreatePolyedrs ) ) {
mySelectionMgr->clearSelected();
- SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
- bool autoUpdate = false;
- if (mgr && mgr->stringValue("SMESH", "AutomaticUpdate").compare("true") == 0)
- autoUpdate = true;
+ bool autoUpdate = SMESHGUI::automaticUpdate();
if (!isRefine() && autoUpdate) {
_PTR(SObject) aSO = SMESH::FindSObject(myMesh.in());
SMESH_Actor* anActor = SMESH::FindActorByEntry(aSO->GetID().c_str());
if (!isRefine() && autoUpdate) {
_PTR(SObject) aSO = SMESH::FindSObject(myMesh.in());
SMESH_Actor* anActor = SMESH::FindActorByEntry(aSO->GetID().c_str());
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
{
myPattern = SMESH::SMESH_Pattern::_duplicate(myCreationDlg->GetPattern());
myName->setText(myCreationDlg->GetPatternName());
{
myPattern = SMESH::SMESH_Pattern::_duplicate(myCreationDlg->GetPattern());
myName->setText(myCreationDlg->GetPatternName());
aProp->SetRepresentationToWireframe();
aProp->SetColor(250, 0, 250);
if (SMESH::FindActorByObject(myMesh))
aProp->SetRepresentationToWireframe();
aProp->SetColor(250, 0, 250);
if (SMESH::FindActorByObject(myMesh))
SMESH::long_array_var keyPoints = myPattern->GetKeyPoints();
if (keyPoints->length()) {
myNode1->setEnabled(true);
SMESH::long_array_var keyPoints = myPattern->GetKeyPoints();
if (keyPoints->length()) {
myNode1->setEnabled(true);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e && e->GetType() == (myType == Type_2d ? SMDSAbs_Face : SMDSAbs_Volume))
newIndices.Add(e->GetID());
}
mySelector->AddOrRemoveIndex( anActor->getIO(), newIndices, false);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e && e->GetType() == (myType == Type_2d ? SMDSAbs_Face : SMDSAbs_Volume))
newIndices.Add(e->GetID());
}
mySelector->AddOrRemoveIndex( anActor->getIO(), newIndices, false);
- myViewWindow->highlight( anActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anActor->getIO(), true, true );