From: nds Date: Thu, 17 Sep 2015 04:58:07 +0000 (+0300) Subject: Issue #986 activate field after apply constarint on one object X-Git-Tag: V_1.4.0~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2671a2abbd0c3101a3b963c91dd9dbc5b6018bb;p=modules%2Fshaper.git Issue #986 activate field after apply constarint on one object It blocks signals of widgets, which are to be removed --- 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;