X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXGUI%2FXGUI_SelectionMgr.cpp;h=49bcdcbd375174e0c6ad221b217250cf38c26ad8;hb=6a23207a9154dac27c710190281aa5bfcf2bd498;hp=78b20ee7d68cdf9a6d0dd07c4e0d2ccd9d076614;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index 78b20ee7d..49bcdcbd3 100644 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -105,6 +106,7 @@ void XGUI_SelectionMgr::setSelectedOwners(const SelectMgr_IndexedMapOfOwner& the //************************************************************** void XGUI_SelectionMgr::onObjectBrowserSelection() { + myLastSelectionPlace = ModuleBase_ISelection::Browser; QList aSelectedPrs = myWorkshop->selector()->selection()->getSelected(ModuleBase_ISelection::Browser); XGUI_Displayer* aDisplayer = myWorkshop->displayer(); @@ -130,17 +132,24 @@ void XGUI_SelectionMgr::onObjectBrowserSelection() } } aDisplayer->setSelected(aSelectedPrs); + myWorkshop->updateColorScaleVisibility(); emit selectionChanged(); } //************************************************************** 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);