Salome HOME
Provide preselection
[modules/shaper.git] / src / XGUI / XGUI_Displayer.cpp
index dfbb75db58bb234acee173434b96204b9ab2ce9e..0bdf7633e70b7beec87742510e57237057f02272 100644 (file)
@@ -232,11 +232,8 @@ void XGUI_Displayer::setSelected(const QList<ObjectPtr>& theResults, const bool
   aContext->ClearSelected();
   foreach(ObjectPtr aResult, theResults)
   {
-    if (myResult2AISObjectMap.find(aResult) == myResult2AISObjectMap.end())
-      continue;
-
-    AISObjectPtr anObj = myResult2AISObjectMap[aResult];
-    if (anObj) {
+    if (isVisible(aResult)) {
+      AISObjectPtr anObj = myResult2AISObjectMap[aResult];
       Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
       if (!anAIS.IsNull())
         aContext->SetSelected(anAIS, false);