From: vsv Date: Thu, 30 May 2019 12:57:27 +0000 (+0300) Subject: Exclude ViewCube from selection processing X-Git-Tag: VEDF2019Lot4~114^2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=08cb40a14d5ea6d3d7adf236ed38a32c7cf1c653;p=modules%2Fshaper.git Exclude ViewCube from selection processing --- diff --git a/src/ModuleBase/ModuleBase_FilterValidated.cpp b/src/ModuleBase/ModuleBase_FilterValidated.cpp index 3a4d58485..505bbe3d0 100644 --- a/src/ModuleBase/ModuleBase_FilterValidated.cpp +++ b/src/ModuleBase/ModuleBase_FilterValidated.cpp @@ -49,6 +49,8 @@ Standard_Boolean ModuleBase_FilterValidated:: if (aCurrentWidget) { ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs()); myWorkshop->selection()->fillPresentation(aPrs, theOwner); + if (aPrs->isEmpty()) + return false; ModuleBase_WidgetValidated* aWidgetValidated = dynamic_cast (aCurrentWidget); if (aWidgetValidated) diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index 64820f7cd..60fe5e30f 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -23,6 +23,10 @@ #include "XGUI_ViewerProxy.h" #include "XGUI_ObjectsBrowser.h" +#ifndef HAVE_SALOME +#include +#endif + #include "ModuleBase_BRepOwner.h" #include "ModuleBase_ResultPrs.h" #include "ModuleBase_ViewerPrs.h" @@ -196,9 +200,15 @@ void XGUI_Selection::getSelectedInBrowser(QList& thePre void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs, const Handle(SelectMgr_EntityOwner)& theOwner) const { - thePrs->setOwner(theOwner); Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable()); +#ifndef HAVE_SALOME + Handle(AppElements_ViewCube) aCube = Handle(AppElements_ViewCube)::DownCast(anIO); + if (!aCube.IsNull()) + return; +#endif + + thePrs->setOwner(theOwner); thePrs->setInteractive(anIO); // we should not check the appearance of this feature because there can be some selected shapes