Salome HOME
Issue #687: Provide selection of trihedron for non-sketcher operations
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 29 Apr 2016 15:01:57 +0000 (18:01 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 29 Apr 2016 15:02:10 +0000 (18:02 +0300)
src/PartSet/PartSet_SketcherMgr.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_Selection.cpp

index 9b9077efa35d1563c0acea179c0a25aa84fec84b..51d5043cbf8e96544e3ac9bb3310da0959680627 100755 (executable)
@@ -858,7 +858,6 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation)
   // Display all sketcher sub-Objects
   myCurrentSketch = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aFOperation->feature());
   XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myModule->workshop());
-  aConnector->workshop()->displayer()->activateTrihedron(true);
 
   // Hide sketcher result
   std::list<ResultPtr> aResults = myCurrentSketch->results();
@@ -967,7 +966,6 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
   }
   // restore the module selection modes, which were changed on startSketch
   aConnector->activateModuleSelectionModes();
-  aConnector->workshop()->displayer()->activateTrihedron(false);
 }
 
 void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
index 6e006e9f7f10c86232b28703e609304774d0009e..3713da44337de08bc49715681f1d3161e8ef2c92 100644 (file)
@@ -109,7 +109,7 @@ QString qIntListInfo(const QIntList& theValues, const QString& theSeparator = QS
 
 XGUI_Displayer::XGUI_Displayer(XGUI_Workshop* theWorkshop)
   : myWorkshop(theWorkshop), myNeedUpdate(false),
-  myIsTrihedronActive(false), myViewerBlockedRecursiveCount(0)
+  myIsTrihedronActive(true), myViewerBlockedRecursiveCount(0)
 {
   myCustomPrs = std::shared_ptr<GeomAPI_ICustomPrs>(new XGUI_CustomPrs(theWorkshop));
 }
index eb59cf8c8274cdcc3cd2044754da17d06412c4a8..6642e5436baa8ba2b6dd8a17a63aae80bc3178dd 100644 (file)
@@ -174,6 +174,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
         if (aAx.get()) {
           thePrs->setObject(aAx);
           thePrs->setShape(aAx->shape());
+          return;
         }
       }
     } else {
@@ -191,6 +192,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
         if (aOrigin.get()) {
           thePrs->setObject(aOrigin);
           thePrs->setShape(aOrigin->shape());
+          return;
         }
       }
     }