]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1431: Show message if not all results can be highlighted in object browser
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 25 Apr 2016 08:22:39 +0000 (11:22 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 25 Apr 2016 08:22:53 +0000 (11:22 +0300)
src/XGUI/XGUI_Workshop.cpp

index 45240ddb7ccddbdba16d013894a4c3c0af4edb5a..54775a47b62e381c5ba0dd1610d2a45283b4855c 100755 (executable)
@@ -1983,12 +1983,14 @@ void XGUI_Workshop::highlightResults(const QObjectPtrList& theObjects)
   FeaturePtr aFeature;
   QObjectPtrList aSelList = theObjects;
   std::list<ResultPtr> aResList;
+  bool aHasHidden = false;
   foreach(ObjectPtr aObj, theObjects) {
     aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
     if (aFeature.get()) {
       aResList = aFeature->results();
       std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aIt;
       for(aIt = aResList.cbegin(); aIt != aResList.cend(); aIt++) {
+        aHasHidden |= (*aIt)->isConcealed();
         aSelList.append(*aIt);
       }
     }
@@ -1999,6 +2001,9 @@ void XGUI_Workshop::highlightResults(const QObjectPtrList& theObjects)
     objectBrowser()->setObjectsSelected(aSelList);
     objectBrowser()->blockSignals(aBlocked);
   }
+  if (aHasHidden) 
+    QMessageBox::information(desktop(), tr("Find results"), 
+                             tr("Not all results can be highlighted"), QMessageBox::Ok);
 }
 
 void XGUI_Workshop::highlightFeature(const QObjectPtrList& theObjects)