From: nds Date: Tue, 17 Nov 2015 05:20:00 +0000 (+0300) Subject: Bug: sketch, closed controur, group, selection of edge. The result is that all edges... X-Git-Tag: V_2.0.0_alfa2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d98c9ab081eb1d1c4e8865584d51fce6b6293a06;p=modules%2Fshaper.git Bug: sketch, closed controur, group, selection of edge. The result is that all edges on the sketch are selected. Reason: sketch manager is performed for the Group feature. --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 5accebfb8..dcdd6ecc6 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -271,7 +271,8 @@ void PartSet_SketcherMgr::onLeaveViewPort() void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel() { - if (isNestedCreateOperation(getCurrentOperation())) + if (!isNestedEditOperation(getCurrentOperation()) || + myModule->sketchReentranceMgr()->isInternalEditActive()) return; // it is necessary to save current selection in order to restore it after the values are modifed storeSelection(); @@ -284,7 +285,8 @@ void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel() void PartSet_SketcherMgr::onAfterValuesChangedInPropertyPanel() { - if (isNestedCreateOperation(getCurrentOperation())) + if (!isNestedEditOperation(getCurrentOperation()) || + myModule->sketchReentranceMgr()->isInternalEditActive()) return; // it is necessary to restore current selection in order to restore it after the values are modified restoreSelection(); @@ -767,6 +769,13 @@ bool PartSet_SketcherMgr::isNestedCreateOperation(ModuleBase_Operation* theOpera return aFOperation && !aFOperation->isEditOperation() && isNestedSketchOperation(aFOperation); } +bool PartSet_SketcherMgr::isNestedEditOperation(ModuleBase_Operation* theOperation) +{ + ModuleBase_OperationFeature* aFOperation = dynamic_cast + (theOperation); + return aFOperation && aFOperation->isEditOperation() && isNestedSketchOperation(aFOperation); +} + bool PartSet_SketcherMgr::isEntity(const std::string& theId) { return (theId == SketchPlugin_Line::ID()) || diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 3b3280152..284d2b316 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -94,6 +94,11 @@ public: //// \return boolean value static bool isNestedCreateOperation(ModuleBase_Operation* theOperation); + /// Returns true if the operation is an edit nested feature one + /// \param theOperation a checked operation + //// \return boolean value + static bool isNestedEditOperation(ModuleBase_Operation* theOperation); + /// Returns whether the current operation is a sketch entity - line, point, arc or circle /// \param theId is an id of object /// \return a boolean value