Salome HOME
0020847: EDF 1378 SMESH : Selection problem with symetry + translation
authordmv <dmv@opencascade.com>
Wed, 21 Apr 2010 06:32:54 +0000 (06:32 +0000)
committerdmv <dmv@opencascade.com>
Wed, 21 Apr 2010 06:32:54 +0000 (06:32 +0000)
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx

index 4b4a633e92ec1d3b15995d9512b0a397459f96a4..868373139f12e815d0cdc5b68ad6fd6eae825588 100644 (file)
@@ -472,7 +472,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
   //if (myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
   //    !myMeshActor || myPathMesh->_is_nil() || myPathShape->_is_nil())
   if ( myMesh->_is_nil() || MeshCheck->isChecked() && myIDSource->_is_nil() ||
-       !myMeshActor || myPath->_is_nil() )
+       /*!myMeshActor ||*/ myPath->_is_nil() )
     return false;
 
   if (!isValid())
@@ -484,7 +484,10 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
     // If "Select whole mesh, submesh or group" check box is off ->
     // use only elements of given type selected by user
 
-    SMDS_Mesh* aMesh = myMeshActor->GetObject()->GetMesh();
+    SMDS_Mesh* aMesh;
+    if ( myMeshActor )
+      aMesh = myMeshActor->GetObject()->GetMesh();
+
     if (aMesh) {
       QStringList aListElementsId = ElementsLineEdit->text().split(" ", QString::SkipEmptyParts);
       anElementsId = new SMESH::long_array;
@@ -664,7 +667,9 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
   }
 
   //mySelectionMgr->clearSelected();
-  SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() );
+  if ( myMeshActor )
+    SMESH::Update( myMeshActor->getIO(), myMeshActor->GetVisibility() );
+    
   if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() )
     mySMESHGUI->updateObjBrowser(true); // new groups may appear
   //SMESH::UpdateView();
@@ -855,7 +860,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::SelectionIntoArgument()
     }
     // find actor
     myMeshActor = SMESH::FindActorByObject(myMesh);
-    if (!myMeshActor)
+    if (!myMeshActor && !MeshCheck->isChecked())
       return;
 
     if (MeshCheck->isChecked()) {
@@ -988,7 +993,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument()
 void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button)
 {
   disconnect(mySelectionMgr, 0, this, 0);
-  mySelectionMgr->clearSelected();
+  //  mySelectionMgr->clearSelected();
   mySelectionMgr->clearFilters();
   SMESH::SetPickable();
 
index cae6339b0e65cce502faec7efa5ce0084a77d45b..d1f35f5fdd6ad38e491a5280ca7595e69ee93994 100644 (file)
@@ -714,7 +714,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
   SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar);
   if (!anActor)
     anActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!anActor)
+  if (!anActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index a34ec8c65d4441a5b3201ada7c3c363455e8be25..bdec01dbf7b363465a40a5df99c785ad25776e2e 100644 (file)
@@ -605,7 +605,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index c4706505edafd4a7291132ce8759a67a2c321aaf..2679ffe6e04b42816be3cde80fe99453f82c5be7 100644 (file)
@@ -675,7 +675,7 @@ void SMESHGUI_ScaleDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index d0d6365a6fea9605440f879a0f696a5a1af40b82..b66cf70faab61639d4dfac1d83f89b98ee2a41a6 100644 (file)
@@ -386,11 +386,13 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
     }
 
     if (aResult) {
-      Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+      if ( myActor ) {
+        Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
+        SALOME_ListIO aList;
+        aList.Append(anIO);
+        mySelectionMgr->setSelectedObjects(aList, false);
+      }
 
-      SALOME_ListIO aList;
-      aList.Append(anIO);
-      mySelectionMgr->setSelectedObjects(aList, false);
       SMESH::UpdateView();
       Init();
 
@@ -564,7 +566,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
     return;
 
   myActor = SMESH::FindActorByObject(myMesh);
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index cf863ff4a3836ae0ab0155040f685858ab2fbced..661b50bbaed95771ee2a53b196dfbe01702e8be5 100644 (file)
@@ -695,7 +695,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
+  if (!myActor && !CheckBoxMesh->isChecked())
     return;
 
   int aNbUnits = 0;
index 354176e92cc3da95950a7a9818456ae2c7219343..47ff56c1f0b6f7b62ba78620a97b389fe866c2de 100644 (file)
@@ -676,8 +676,9 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
   myActor = SMESH::FindActorByObject(myMesh);
   if (!myActor)
     myActor = SMESH::FindActorByEntry(IO->getEntry());
-  if (!myActor)
-    return;
+
+  if (!myActor && !CheckBoxMesh->isChecked())
+      return;
 
   int aNbUnits = 0;