Salome HOME
Meet coding standard (fix too long lines).
[modules/shaper.git] / src / XGUI / XGUI_Selection.cpp
index 09c0c1fcdeac0fed5c74afe8cb119373bcfc30a4..60fe5e30f296d254f0d42ec2b75136524b02b07e 100644 (file)
 #include "XGUI_ViewerProxy.h"
 #include "XGUI_ObjectsBrowser.h"
 
+#ifndef HAVE_SALOME
+#include <AppElements_ViewCube.h>
+#endif
+
 #include "ModuleBase_BRepOwner.h"
 #include "ModuleBase_ResultPrs.h"
 #include "ModuleBase_ViewerPrs.h"
@@ -196,9 +200,15 @@ void XGUI_Selection::getSelectedInBrowser(QList<ModuleBase_ViewerPrsPtr>& 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
@@ -206,7 +216,8 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
   Handle(StdSelect_BRepOwner) aBRO = Handle(StdSelect_BRepOwner)::DownCast(theOwner);
   if( !aBRO.IsNull() && aBRO->HasShape() ) {
     TopoDS_Shape aShape = aBRO->Shape();
-    Handle(ModuleBase_ResultPrs) aPrsObj = Handle(ModuleBase_ResultPrs)::DownCast(aBRO->Selectable());
+    Handle(ModuleBase_ResultPrs) aPrsObj =
+      Handle(ModuleBase_ResultPrs)::DownCast(aBRO->Selectable());
     if (!aPrsObj.IsNull()) {
       if (aPrsObj->isSubstituted()) {
         if (aPrsObj->Shape().IsSame(aShape))