From: nds Date: Wed, 23 Dec 2015 15:52:10 +0000 (+0300) Subject: Correction tab logic. X-Git-Tag: V_2.1.0~59 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5bb399c88a1cefa30c03754e57b6c684ce733018;p=modules%2Fshaper.git Correction tab logic. --- diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index feba11647..fc7beb3e2 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -114,13 +114,8 @@ void ModuleBase_ModelWidget::enableFocusProcessing() { QList aMyControls = getControls(); foreach(QWidget* eachControl, aMyControls) { - if (myIsObligatory) { eachControl->setFocusPolicy(Qt::StrongFocus); eachControl->installEventFilter(this); - } - else { - eachControl->setFocusPolicy(Qt::NoFocus); - } } } diff --git a/src/ModuleBase/ModuleBase_ToolBox.cpp b/src/ModuleBase/ModuleBase_ToolBox.cpp index 592b5a032..57c7332c6 100644 --- a/src/ModuleBase/ModuleBase_ToolBox.cpp +++ b/src/ModuleBase/ModuleBase_ToolBox.cpp @@ -45,6 +45,7 @@ void ModuleBase_ToolBox::addItem( QWidget* thePage, const QString& theName, cons myStack->addWidget( thePage ); QToolButton* aButton = new QToolButton( myButtonsFrame ); + aButton->setFocusPolicy(Qt::StrongFocus); aButton->setCheckable( true ); aButton->setIcon( theIcon ); aButton->setIconSize( theIcon.size() ); diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 1e61bf5e7..a189af9bd 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -171,6 +171,8 @@ void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget) if (!aValidators->isCase(aCurrentWidget->feature(), aCurrentWidget->attributeID())) continue; // this attribute is not participated in the current case + if (!aCurrentWidget->isObligatory()) + continue; // not obligatory widgets are not activated automatically if (aCurrentWidget->focusTo()) { return; @@ -180,7 +182,7 @@ void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget) } activateWidget(NULL); } - +//#define DEBUG_TAB #ifdef DEBUG_TAB void findDirectChildren(QWidget* theParent, QList& theWidgets, const bool theDebug) {