Salome HOME
#1277 SKETCH : Bad restitution coordinates in the point creation panel
[modules/shaper.git] / src / ModuleBase / ModuleBase_ISelection.cpp
index 9eaf186dc4181b9e8f8a66016250f9fbdf7fef66..d5c325558b186df333cc949b379e9a2fef344754 100644 (file)
@@ -38,13 +38,12 @@ ResultPtr ModuleBase_ISelection::getResult(const ModuleBase_ViewerPrs& thePrs)
 {
   ResultPtr aResult;
 
-  if (!thePrs.owner().IsNull()) {
+  if (thePrs.object().get())
+    aResult = std::dynamic_pointer_cast<ModelAPI_Result>(thePrs.object());
+  else if (!thePrs.owner().IsNull()) {
     ObjectPtr anObject = getSelectableObject(thePrs.owner());
     aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
   }
-  else {
-    aResult = std::dynamic_pointer_cast<ModelAPI_Result>(thePrs.object());
-  }
 
   return aResult;
 }
@@ -84,7 +83,7 @@ QList<ModuleBase_ViewerPrs> ModuleBase_ISelection::getViewerPrs(const QObjectPtr
 }
 
 //********************************************************************
-void ModuleBase_ISelection::filterPreselectionOnEqualPoints
+void ModuleBase_ISelection::filterSelectionOnEqualPoints
                                               (QList<ModuleBase_ViewerPrs>& theSelected)
 {
   QList<ModuleBase_ViewerPrs> aCandidatesToRemove;