X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ErrorDialog.cpp;h=c6d2e90d6cce61add21db7e2263fe80c9fa1d2ed;hb=b5ed624c7308fceecfb3237d1e099729a1cd3c76;hp=5a8258dc09c91bffa7a4d1c29f4ed3d6cad430f6;hpb=0ff644739fa90d6f15d410f69e41bb5d1cddc25a;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ErrorDialog.cpp b/src/XGUI/XGUI_ErrorDialog.cpp index 5a8258dc0..c6d2e90d6 100644 --- a/src/XGUI/XGUI_ErrorDialog.cpp +++ b/src/XGUI/XGUI_ErrorDialog.cpp @@ -20,10 +20,10 @@ XGUI_ErrorDialog::XGUI_ErrorDialog(QWidget* parent) myErrorLog = new QTextEdit(this); myErrorLog->setReadOnly(true); aDlgLay->addWidget(myErrorLog); - QDialogButtonBox* aButtonBox = - new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal, this); + QDialogButtonBox* aButtonBox = new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal, + this); aDlgLay->addWidget(aButtonBox); - aDlgLay->setContentsMargins(2,2,2,2); + aDlgLay->setContentsMargins(2, 2, 2, 2); aDlgLay->setSpacing(2); setLayout(aDlgLay); resize(420, 240); @@ -56,6 +56,11 @@ void XGUI_ErrorDialog::addError(const QString& theError) { myErrors.append(theError); refresh(); + if (!isVisible()) { + show(); + raise(); + activateWindow(); + } } void XGUI_ErrorDialog::removeError(const QString& theError) @@ -63,4 +68,3 @@ void XGUI_ErrorDialog::removeError(const QString& theError) myErrors.removeAll(theError); refresh(); } -