From 480beb4a14eb6448ba1409a8ae1877916b4e453d Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 20 Aug 2015 15:50:55 +0300 Subject: [PATCH] Boolean result build correction. There was a stabilization fix, which disconnected widgets. But debug the active widget can be used during validating if selection is changed. It is not correct after commit is pressed and should not influence on the feature. So, it is more correctly to clean content of the property panel before commit. Scenario to reproduce the problem: Create sketch(contour), create sketch(circles in the contour), create extrusion(contour), extrusion(circles), create boolean from contour-based to Cut circle-based extrusions. Apply, the circle-based extrusions are disappeared from the second control. --- src/ModuleBase/ModuleBase_Operation.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index fb3bebd72..6557d71b8 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -187,6 +187,14 @@ void ModuleBase_Operation::abort() new Events_Message(Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED))); Events_Loop::loop()->send(aMsg); + // the widgets of property panel should not process any events come from data mode + // after abort clicked. Some signal such as redisplay/create influence on content + // of the object browser and viewer context. Therefore it influence to the current + // selection and if the active widget listens it, the attribute value is errnoneous + // changed. + if (myPropertyPanel) + myPropertyPanel->cleanContent(); + SessionPtr aMgr = ModelAPI_Session::get(); if (myIsEditing) { DocumentPtr aDoc = aMgr->activeDocument(); @@ -220,6 +228,14 @@ void ModuleBase_Operation::abort() bool ModuleBase_Operation::commit() { if (canBeCommitted()) { + // the widgets of property panel should not process any events come from data mode + // after commit clicked. Some signal such as redisplay/create influence on content + // of the object browser and viewer context. Therefore it influence to the current + // selection and if the active widget listens it, the attribute value is errnoneous + // changed. + if (myPropertyPanel) + myPropertyPanel->cleanContent(); + SessionPtr aMgr = ModelAPI_Session::get(); /// Set current feature and remeber old current feature if (myIsEditing) { -- 2.39.2