]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1150 Tab buttons problems
authornds <nds@opencascade.com>
Fri, 25 Dec 2015 14:53:12 +0000 (17:53 +0300)
committernds <nds@opencascade.com>
Fri, 25 Dec 2015 14:53:12 +0000 (17:53 +0300)
#1112 tab key doesn't work on the last field of left panels

src/XGUI/XGUI_PropertyPanel.cpp

index d9335f4bcc8fa46926df4e5c0b2fdb82a92d4409..aba8f914e45c64767dec796e0e1869cf94ea0ff5 100755 (executable)
@@ -208,7 +208,11 @@ void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget,
     isFoundWidget = isFoundWidget || (*anIt) == theWidget;
   }
   activateWidget(NULL);
-  //focusNextPrevChild(true);
+  // 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 = findChild<QToolButton*>(PROP_PANEL_OK);
+  if (anOkBtn)
+    anOkBtn->setFocus(Qt::TabFocusReason);
 }
 
 //#define DEBUG_TAB_WIDGETS