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();
#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);
}
}
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;
}