From baabb8f09a34e5eef85aa13287a7f429025a00ca Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 9 Nov 2015 16:09:15 +0300 Subject: [PATCH] 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. --- src/PartSet/PartSet_SketcherMgr.cpp | 6 ++++++ src/PartSet/PartSet_SketcherMgr.h | 3 +++ src/PartSet/PartSet_SketcherReetntrantMgr.cpp | 3 +++ 3 files changed, 12 insertions(+) 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; } -- 2.39.2