From: nds Date: Mon, 9 Nov 2015 13:09:15 +0000 (+0300) Subject: Internal edit launch: clear cashed viewer flags in sketch manager X-Git-Tag: V_2.0.0_alfa1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=baabb8f09a34e5eef85aa13287a7f429025a00ca;p=modules%2Fshaper.git Internal edit launch: clear cashed viewer flags in sketch manager Erroneous scenario: create line, click 1st, click 2nd. Internal edit is started, input another value, Sift +Tab to input the previous point value. The result is that point is changed by previous click position. --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index a5a44efb2..fee888118 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -719,6 +719,12 @@ QString PartSet_SketcherMgr::getFeatureError(const FeaturePtr& theFeature, const return anError; } +void PartSet_SketcherMgr::clearClickedFlags() +{ + myClickedPoint.clear(); + myCurrentPoint.clear(); +} + const QStringList& PartSet_SketcherMgr::sketchOperationIdList() { static QStringList aIds; diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 1800688a3..8971ba26f 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -186,6 +186,9 @@ public: //! \return string value QString getFeatureError(const FeaturePtr& theFeature, const bool isCheckGUI = true); + /// It nullify internal flags concerned to clicked mouse event + void clearClickedFlags(); + /// Returns list of strings which contains id's of sketch operations static const QStringList& sketchOperationIdList(); diff --git a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp index abde2a78b..52460b5ed 100755 --- a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp +++ b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp @@ -304,6 +304,9 @@ bool PartSet_SketcherReetntrantMgr::startInternalEdit(const std::string& thePrev } } } + if (isDone) + module()->sketchMgr()->clearClickedFlags(); + return isDone; }