From: vsv Date: Fri, 29 Apr 2016 15:01:57 +0000 (+0300) Subject: Issue #687: Provide selection of trihedron for non-sketcher operations X-Git-Tag: V_2.3.0~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bb6d7a8ceec03133c670d29508090f298cb6c50;p=modules%2Fshaper.git Issue #687: Provide selection of trihedron for non-sketcher operations --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 9b9077efa..51d5043cb 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -858,7 +858,6 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation) // Display all sketcher sub-Objects myCurrentSketch = std::dynamic_pointer_cast(aFOperation->feature()); XGUI_ModuleConnector* aConnector = dynamic_cast(myModule->workshop()); - aConnector->workshop()->displayer()->activateTrihedron(true); // Hide sketcher result std::list 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) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 6e006e9f7..3713da443 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -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(new XGUI_CustomPrs(theWorkshop)); } diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index eb59cf8c8..6642e5436 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -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; } } }