]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2352 - Undo list is disabled when change focus from multi-selection to ordinar...
authornds <nds@opencascade.com>
Thu, 14 Dec 2017 20:29:26 +0000 (23:29 +0300)
committernds <nds@opencascade.com>
Thu, 14 Dec 2017 20:29:26 +0000 (23:29 +0300)
Issue #2368 - Fatal error when Undo in Fillet

src/XGUI/XGUI_PropertyPanel.cpp

index 7c5ac6ed49c36acab6ce5be9dfb80dbca368ca30..3e8e67584c8e6d622abe1213c7e653ca6329ba75 100755 (executable)
@@ -493,11 +493,11 @@ bool XGUI_PropertyPanel::setActiveWidget(ModuleBase_ModelWidget* theWidget, cons
 #ifdef DEBUG_ACTIVE_WIDGET
   std::cout << "myActiveWidget = " << (theWidget ? theWidget->context().c_str() : "") << std::endl;
 #endif
-  bool anIsNoMoreWidgets = false;
+  bool aHasMoreWidgets = true;
   if (isEmitSignal) {
     //emit widgetActivated(myActiveWidget);
     if (!myActiveWidget && !isEditingMode()) {
-      anIsNoMoreWidgets = true;
+      aHasMoreWidgets = false;
       emit noMoreWidgets(aPreviosAttributeID);
     }
   }
@@ -508,12 +508,12 @@ bool XGUI_PropertyPanel::setActiveWidget(ModuleBase_ModelWidget* theWidget, cons
   myOperationMgr->workshop()->selectionActivate()->updateSelectionModes();
   myOperationMgr->workshop()->selectionActivate()->updateSelectionFilters();
 
-  if (aDeactivatedWidget)
+  if (aHasMoreWidgets && aDeactivatedWidget)
     aDeactivatedWidget->updateAfterDeactivation();
-  if (anActivatedWidget)
+  if (aHasMoreWidgets && anActivatedWidget)
     anActivatedWidget->updateAfterActivation();
 
-  if (!anIsNoMoreWidgets && myActiveWidget)
+  if (aHasMoreWidgets && myActiveWidget)
   {
     // restore widget selection should be done after selection modes of widget activating
     static Events_ID anEvent = Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION);