From: vsv Date: Mon, 3 Feb 2020 09:43:59 +0000 (+0300) Subject: Update viewer after selection clear for OCCT 7.4.0. X-Git-Tag: V9_5_0a1~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bbf6e2c75c79cb80729eb85baecf4d1a17dd7ed8;p=modules%2Fshaper.git Update viewer after selection clear for OCCT 7.4.0. --- diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index b7c1a65bc..49bcdcbd3 100644 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -142,9 +142,14 @@ void XGUI_SelectionMgr::onViewerSelection() myLastSelectionPlace = ModuleBase_ISelection::Viewer; QList 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);