]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update viewer after selection clear for OCCT 7.4.0.
authorvsv <vsv@opencascade.com>
Mon, 3 Feb 2020 09:43:59 +0000 (12:43 +0300)
committervsv <vsv@opencascade.com>
Mon, 3 Feb 2020 09:43:59 +0000 (12:43 +0300)
src/XGUI/XGUI_SelectionMgr.cpp

index b7c1a65bca80bb5cf842574e5010e8fdd1ba2125..49bcdcbd375174e0c6ad221b217250cf38c26ad8 100644 (file)
@@ -142,9 +142,14 @@ void XGUI_SelectionMgr::onViewerSelection()
   myLastSelectionPlace = ModuleBase_ISelection::Viewer;
   QList<ModuleBase_ViewerPrsPtr> aValues;
   Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
-  if (!aContext.IsNull())
+  if (!aContext.IsNull()) {
     aValues = selection()->getSelected(ModuleBase_ISelection::Viewer);
-
+    // Update is necessary for OCCT 7.4.0: when it is clears selection it doesn't updates viewer
+#if OCC_VERSION_HEX == 0x070400
+    if (aValues.isEmpty())
+      aContext->UpdateCurrentViewer();
+#endif
+  }
   QObjectPtrList anObjects;
   convertToObjectBrowserSelection(aValues, anObjects);
   myWorkshop->objectBrowser()->setObjectsSelected(anObjects);