Salome HOME
Fix for bug #393: It's impossible to work in Change layer order dialog with keyboard...
authormzn <mzn@opencascade.com>
Wed, 2 Apr 2014 10:13:16 +0000 (10:13 +0000)
committermzn <mzn@opencascade.com>
Wed, 2 Apr 2014 10:13:16 +0000 (10:13 +0000)
src/HYDROGUI/HYDROGUI_OrderedListWidget.cxx
src/HYDROGUI/HYDROGUI_OrderedListWidget.h
src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx

index 671102d0d141b165bb680101bf3192a1b8aa2d19..e1b2e7ebf12f41c398592abd308379a868ea01f1 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <QLayout>
 #include <QListView>
-#include <QToolButton>
+#include <QPushButton>
 #include <QSignalMapper>
 #include <QSortFilterProxyModel>
 
@@ -66,16 +66,16 @@ HYDROGUI_OrderedListWidget::HYDROGUI_OrderedListWidget( QWidget* theParent )
 
   // Buttons top, up, down, bottom
   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
-  myTop = new QToolButton;
+  myTop = new QPushButton( this );
   myTop->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_TOP_ICO" ) ) );
   myTop->setIconSize( QSize( 32, 32 ) );
-  myUp = new QToolButton;
+  myUp = new QPushButton( this );
   myUp->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_UP_ICO" ) ) );
   myUp->setIconSize( myTop->iconSize() );
-  myDown = new QToolButton;
+  myDown = new QPushButton( this );
   myDown->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_DOWN_ICO" ) ) );
   myDown->setIconSize( myTop->iconSize() );
-  myBottom = new QToolButton;
+  myBottom = new QPushButton( this );
   myBottom->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_BOTTOM_ICO" ) ) );
   myBottom->setIconSize( myTop->iconSize() );
 
index 698c853343c458b024101438b338d63e516465d0..e199fb7aae73a05fe3629589e0b122b5cd65a25e 100644 (file)
@@ -28,7 +28,7 @@
 #include <QWidget>
 
 class QListView;
-class QToolButton;
+class QPushButton;
 
 /** 
  * \class HYDROGUI_OrderedListWidget
@@ -64,10 +64,10 @@ private:
 
 private:
   QListView*   myList;   ///< the list view
-  QToolButton* myTop;    ///< the move on top button
-  QToolButton* myUp;     ///< the move up button
-  QToolButton* myDown;   ///< the move down button
-  QToolButton* myBottom; ///< the move on bottom button
+  QPushButton* myTop;    ///< the move on top button
+  QPushButton* myUp;     ///< the move up button
+  QPushButton* myDown;   ///< the move down button
+  QPushButton* myBottom; ///< the move on bottom button
 
   bool myIsHiddenObjectsShown; ///< defines whether to include hidden objects in the list
 };
index a211e26ee9d9949359fe4b5fac9cf4b8175f4364..81b8f27703e4637824d65b76e264654176044684 100644 (file)
@@ -57,6 +57,7 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* t
 
   // Apply and close buttons
   myApply = new QPushButton( tr("APPLY") );
+  myApply->setDefault( true );
   myClose = new QPushButton( tr("CLOSE") );
   
   // Layout