+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
/*
* XGUI_ErrorDialog.cpp
*
*/
#include <XGUI_ErrorDialog.h>
+#include <ModuleBase_Tools.h>
+
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QLabel>
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);
{
myErrors.append(theError);
refresh();
+ if (!isVisible()) {
+ show();
+ raise();
+ ModuleBase_Tools::activateWindow(this, "XGUI_ErrorDialog::addError");
+ }
}
void XGUI_ErrorDialog::removeError(const QString& theError)
myErrors.removeAll(theError);
refresh();
}
-