From: dmv Date: Tue, 11 Mar 2008 09:35:00 +0000 (+0000) Subject: IPAL18207 Desktop changes in size after save long path or name X-Git-Tag: TG_start_ELNO_visualization~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a539c75d81900b70a76450ed56397acc6f7cc2eb;p=modules%2Fgui.git IPAL18207 Desktop changes in size after save long path or name --- diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index e6400595c..b9aa035e0 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -26,11 +26,22 @@ #include #include #include +#include #include #include #include + +class StatusLabel : public QLabel +{ +public: + StatusLabel(QWidget* parent) : QLabel (parent) {}; + + QSize StatusLabel::minimumSizeHint () const { return QSize (0, 0); } +}; + + /*! Default constructor */ @@ -176,7 +187,7 @@ void SUIT_Application::putInfo( const QString& msg, const int msec ) if ( !myStatusLabel ) { - myStatusLabel = new QLabel( desktop()->statusBar() ); + myStatusLabel = new StatusLabel( desktop()->statusBar() ); desktop()->statusBar()->addWidget( myStatusLabel, 1 ); myStatusLabel->show(); } @@ -184,6 +195,7 @@ void SUIT_Application::putInfo( const QString& msg, const int msec ) QString prev = myStatusLabel->text(); myStatusLabel->setText( msg ); + if ( msec != -1 ) QTimer::singleShot( msec <= 0 ? DEFAULT_MESSAGE_DELAY : msec, this, SLOT( onInfoClear() ) );