Salome HOME
Correction tab logic.
authornds <nds@opencascade.com>
Wed, 23 Dec 2015 15:52:10 +0000 (18:52 +0300)
committernds <nds@opencascade.com>
Thu, 24 Dec 2015 15:24:16 +0000 (18:24 +0300)
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_ToolBox.cpp
src/XGUI/XGUI_PropertyPanel.cpp

index feba11647d2650e378e7af013afc71d9075c33ff..fc7beb3e2760b206dd786e1b333459758bdb28de 100644 (file)
@@ -114,13 +114,8 @@ void ModuleBase_ModelWidget::enableFocusProcessing()
 {
   QList<QWidget*> aMyControls = getControls();
   foreach(QWidget*  eachControl, aMyControls) {
-    if (myIsObligatory) {
       eachControl->setFocusPolicy(Qt::StrongFocus);
       eachControl->installEventFilter(this);
-    }
-    else {
-      eachControl->setFocusPolicy(Qt::NoFocus);
-    }
   }
 }
 
index 592b5a0325847da1ed4abc4cb760e1f11cb7a7c5..57c7332c6f85f9822553f3bb4940c51ed4c74549 100644 (file)
@@ -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() );
index 1e61bf5e75edbbefb24728abb9597e805c916b51..a189af9bd281424e3c596cba24040fd46f2cf035 100755 (executable)
@@ -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<QWidget*>& theWidgets, const bool theDebug)
 {