From: nds Date: Thu, 14 Dec 2017 11:21:58 +0000 (+0300) Subject: Issue #2365 problem with active panel in feature and Hide faces windows X-Git-Tag: V_2.10.0RC~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2da45598a74d685cd9e59c3857b618fc25f1dd1a;p=modules%2Fshaper.git Issue #2365 problem with active panel in feature and Hide faces windows Scenario 1: After activation of selection control in propety panel, selection with (previous value is edge, not selected - box) SHIFT should give two objects in control. --- diff --git a/src/XGUI/XGUI_FacesPanel.cpp b/src/XGUI/XGUI_FacesPanel.cpp index 6c1e40370..dcdeaa597 100644 --- a/src/XGUI/XGUI_FacesPanel.cpp +++ b/src/XGUI/XGUI_FacesPanel.cpp @@ -136,9 +136,11 @@ void XGUI_FacesPanel::setActivePanel(const bool theIsActive) myIsActive = theIsActive; if (myIsActive) { + emit activated(); + // selection should be cleared after emit of signal to do not process selection change + // event by the previous selector // the selection is cleared by activating selection control XGUI_Tools::workshop(myWorkshop)->selector()->clearSelection(); - emit activated(); } else emit deactivated(); diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index b878d62c5..737027b35 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -490,12 +490,11 @@ bool XGUI_PropertyPanel::setActiveWidget(ModuleBase_ModelWidget* theWidget, cons #ifdef DEBUG_ACTIVE_WIDGET std::cout << "myActiveWidget = " << (theWidget ? theWidget->context().c_str() : "") << std::endl; #endif - static Events_ID anEvent = Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION); - Events_Loop::loop()->flush(anEvent); - + bool anIsNoMoreWidgets = false; if (isEmitSignal) { //emit widgetActivated(myActiveWidget); if (!myActiveWidget && !isEditingMode()) { + anIsNoMoreWidgets = true; emit noMoreWidgets(aPreviosAttributeID); } } @@ -505,6 +504,13 @@ bool XGUI_PropertyPanel::setActiveWidget(ModuleBase_ModelWidget* theWidget, cons emit propertyPanelDeactivated(); myOperationMgr->workshop()->selectionActivate()->updateSelectionModes(); myOperationMgr->workshop()->selectionActivate()->updateSelectionFilters(); + + if (!anIsNoMoreWidgets && 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); + Events_Loop::loop()->flush(anEvent); + } return true; }