From: mzn Date: Wed, 2 Apr 2014 10:13:16 +0000 (+0000) Subject: Fix for bug #393: It's impossible to work in Change layer order dialog with keyboard... X-Git-Tag: BR_hydro_v1_0_1~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2233da52b04287386cc17b1c1d40b19fdbc13a7;p=modules%2Fhydro.git Fix for bug #393: It's impossible to work in Change layer order dialog with keyboard only. --- diff --git a/src/HYDROGUI/HYDROGUI_OrderedListWidget.cxx b/src/HYDROGUI/HYDROGUI_OrderedListWidget.cxx index 671102d0..e1b2e7eb 100644 --- a/src/HYDROGUI/HYDROGUI_OrderedListWidget.cxx +++ b/src/HYDROGUI/HYDROGUI_OrderedListWidget.cxx @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include @@ -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() ); diff --git a/src/HYDROGUI/HYDROGUI_OrderedListWidget.h b/src/HYDROGUI/HYDROGUI_OrderedListWidget.h index 698c8533..e199fb7a 100644 --- a/src/HYDROGUI/HYDROGUI_OrderedListWidget.h +++ b/src/HYDROGUI/HYDROGUI_OrderedListWidget.h @@ -28,7 +28,7 @@ #include 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 }; diff --git a/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx b/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx index a211e26e..81b8f277 100644 --- a/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx @@ -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