]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
Salome HOME
*** empty log message ***
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshPatternDlg.cxx
index 047781d20f51bdc54ba957e3fe3f71854d659a37..ecd3c522ac29a48bcae2caa1265538f86eee1a42 100755 (executable)
@@ -415,9 +415,7 @@ bool SMESHGUI_MeshPatternDlg::onApply()
     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());
@@ -516,6 +514,8 @@ void SMESHGUI_MeshPatternDlg::onSelectionDone()
     } else if (mySelInput == Ids) {
       SALOME_ListIO aList;
       mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+      if (aList.Extent() != 1)
+       return;
 
       QString anIds;
       if (!SMESH::GetNameOfSelectedElements(mySelector, aList.First(), anIds))
@@ -853,7 +853,7 @@ void SMESHGUI_MeshPatternDlg::displayPreview()
     aProp->SetRepresentationToWireframe();
     aProp->SetColor(250, 0, 250);
     if (SMESH::FindActorByObject(myMesh))
-      aProp->SetLineWidth(SMESH::GetFloat("SMESH:SettingsWidth", 1) +1);
+      aProp->SetLineWidth( SMESH::GetFloat( "SMESH:element_width", 1 ) + 1 );
     else
       aProp->SetLineWidth(1);
     myPreviewActor->SetProperty(aProp);