]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #986 activate field after apply constarint on one object
authornds <nds@opencascade.com>
Thu, 17 Sep 2015 04:58:07 +0000 (07:58 +0300)
committernds <nds@opencascade.com>
Thu, 17 Sep 2015 04:58:34 +0000 (07:58 +0300)
It blocks signals of widgets, which are to be removed

src/XGUI/XGUI_PropertyPanel.cpp

index 3efd40177b3e2040b2408a64fc1880886867f106..89cc82a2718e69d6f46a992c05067d643a40fe76 100644 (file)
@@ -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<ModuleBase_ModelWidget*>::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;