From 0cd070a0e4106dd57c5679d5bac26a0d0afd40b5 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 14 Dec 2017 23:29:26 +0300 Subject: [PATCH] Issue #2352 - Undo list is disabled when change focus from multi-selection to ordinary field Issue #2368 - Fatal error when Undo in Fillet --- src/XGUI/XGUI_PropertyPanel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 7c5ac6ed4..3e8e67584 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -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); -- 2.39.2