X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ErrorDialog.cpp;h=d389e3b3f73d6a04ae35581c56f058acd5fe8ad2;hb=220bd2b37119be1c65abf88a88792445cb9d99f8;hp=5a8258dc09c91bffa7a4d1c29f4ed3d6cad430f6;hpb=d0128ef99f0d27b41c61eb74770ed6a6cbdf56c9;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ErrorDialog.cpp b/src/XGUI/XGUI_ErrorDialog.cpp index 5a8258dc0..d389e3b3f 100644 --- a/src/XGUI/XGUI_ErrorDialog.cpp +++ b/src/XGUI/XGUI_ErrorDialog.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + /* * XGUI_ErrorDialog.cpp * @@ -6,6 +8,8 @@ */ #include +#include + #include #include #include @@ -20,10 +24,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 +60,11 @@ void XGUI_ErrorDialog::addError(const QString& theError) { myErrors.append(theError); refresh(); + if (!isVisible()) { + show(); + raise(); + ModuleBase_Tools::activateWindow(this, "XGUI_ErrorDialog::addError"); + } } void XGUI_ErrorDialog::removeError(const QString& theError) @@ -63,4 +72,3 @@ void XGUI_ErrorDialog::removeError(const QString& theError) myErrors.removeAll(theError); refresh(); } -