From b2671a2abbd0c3101a3b963c91dd9dbc5b6018bb Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 17 Sep 2015 07:58:07 +0300 Subject: [PATCH] Issue #986 activate field after apply constarint on one object It blocks signals of widgets, which are to be removed --- src/XGUI/XGUI_PropertyPanel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 3efd40177..89cc82a27 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -83,6 +83,17 @@ void XGUI_PropertyPanel::cleanContent() { if (myActiveWidget) myActiveWidget->deactivate(); + + // as the widgets are deleted later, it is important that the signals + // of these widgets are not processed. An example of the error is issue 986. + QList::const_iterator anIt = myWidgets.begin(), + aLast = myWidgets.end(); + for (; anIt != aLast; anIt++) { + QWidget* aWidget = *anIt; + if (aWidget) + aWidget->blockSignals(true); + } + myWidgets.clear(); myPanelPage->clearPage(); myActiveWidget = NULL; -- 2.39.2