From: mkr Date: Mon, 30 Jun 2008 06:52:56 +0000 (+0000) Subject: Fix for bug 0019905: EDF 783 ALL: Default button at activation of a module for a... X-Git-Tag: V4_1_4a1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d23fa285c2dae951a8a3fd8036cae2e8bd04fde8;p=modules%2Fgui.git Fix for bug 0019905: EDF 783 ALL: Default button at activation of a module for a new study. --- diff --git a/src/SUIT/SUIT_MsgDlg.cxx b/src/SUIT/SUIT_MsgDlg.cxx index b19372cb8..96e8a616d 100644 --- a/src/SUIT/SUIT_MsgDlg.cxx +++ b/src/SUIT/SUIT_MsgDlg.cxx @@ -160,6 +160,9 @@ int SUIT_MsgDlg::addButton( const QString& btext, const int id ) QPushButton* newButton = new QPushButton( btext, this ); myButtonLayout->insertWidget( myButtons.count(), newButton ); + + if ( myButtons.empty() ) newButton->setDefault(true); + myButtons.insert( newButton, bid ); connect( newButton, SIGNAL( clicked() ), this, SLOT( accept() ) );