* highlighting from the previous active widget
* emits widgetActivated(theWidget) signal
* \param theWidget which has to be activated
+ * \param theEmitSignal a flag to prohibit signal emit
*/
- virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0;
+ virtual void activateWidget(ModuleBase_ModelWidget* theWidget,
+ const bool theEmitSignal = true) = 0;
protected:
aPreviousAttributeWidget->selectContent();
}
else {
+ // in case of shape multi selector, the widget does not lose focus by filling
+ // like it is in shape selector. So, if enter is pressed, the multi shape selector
+ // control should be deactivated. The focus is moved to Apply button and there
+ // should not be active control visualized in property panel
+ if (aPreviousAttributeWidget == aPanel->activeWidget()) {
+ aPanel->activateWidget(NULL, false);
+ }
// if there is no the next widget to be automatically activated, the Ok button in property
// panel should accept the focus(example is parallel constraint on sketch lines)
QToolButton* anOkBtn = aPanel->findChild<QToolButton*>(PROP_PANEL_OK);
activateNextWidget(myActiveWidget);
}
-void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget)
+void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget, const bool theEmitSignal)
{
std::string aPreviosAttributeID;
if(myActiveWidget)
aPreviosAttributeID = myActiveWidget->attributeID();
// Avoid activation of already actve widget. It could happen on focusIn event many times
- if (setActiveWidget(theWidget)) {
+ if (setActiveWidget(theWidget) && theEmitSignal) {
emit widgetActivated(myActiveWidget);
if (!myActiveWidget && !isEditingMode()) {
emit noMoreWidgets(aPreviosAttributeID);
* highlighting from the previous active widget
* emits widgetActivated(theWidget) signal
* \param theWidget which has to be activated
+ * \param theEmitSignal a flag to prohibit signal emit
*/
- virtual void activateWidget(ModuleBase_ModelWidget* theWidget);
+ virtual void activateWidget(ModuleBase_ModelWidget* theWidget, const bool theEmitSignal = true);
void onActivateNextWidget(ModuleBase_ModelWidget* theWidget);