Salome HOME
Improvement: prohibit input focus for modules combo-box
authorvsr <vsr@opencascade.com>
Thu, 1 Dec 2005 11:30:01 +0000 (11:30 +0000)
committervsr <vsr@opencascade.com>
Thu, 1 Dec 2005 11:30:01 +0000 (11:30 +0000)
src/LightApp/LightApp_Application.cxx

index 39c394f62adc6e3bddfca5bfeadb9ccf876a9d9e..f554a11fadbc4162c8f9c6c8f651a6651be376e4 100644 (file)
@@ -73,6 +73,8 @@
 #include <qmap.h>
 #include <qstatusbar.h>
 #include <qthread.h>
+#include <qobjectlist.h>
+#include <qcombobox.h>
 #include <qinputdialog.h>
 
 #define OBJECT_BROWSER_WIDTH 300
@@ -419,7 +421,16 @@ void LightApp_Application::createActions()
   const int iconSize = 20;
 
   modGroup->addTo( modTBar );
-  modTBar->addSeparator();
+  QObjectList *l = modTBar->queryList( "QComboBox" );
+  QObjectListIt oit( *l );
+  while ( QObject* obj = oit.current() ) {
+    QComboBox* cb = (QComboBox*)obj;
+    if ( cb ) cb->setFocusPolicy( QWidget::NoFocus );
+    ++oit;
+  }
+  delete l;
+  
+   modTBar->addSeparator();
 
   QStringList modList;
   modules( modList, false );