From: sbh Date: Thu, 29 May 2014 05:55:12 +0000 (+0400) Subject: Call show method of the error dialog in it's thread. Fixes #79 X-Git-Tag: V_0.4.4~339^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=80019565cbefd8fdff1e84808e5d90ecdd4603d9;p=modules%2Fshaper.git Call show method of the error dialog in it's thread. Fixes #79 --- diff --git a/src/XGUI/XGUI_ErrorDialog.cpp b/src/XGUI/XGUI_ErrorDialog.cpp index 5a8258dc0..c3608f606 100644 --- a/src/XGUI/XGUI_ErrorDialog.cpp +++ b/src/XGUI/XGUI_ErrorDialog.cpp @@ -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(); } - diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 1a5d25095..50eee3179 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -275,9 +275,6 @@ void XGUI_Workshop::processEvent(const Events_Message* theMessage) const Events_Error* anAppError = dynamic_cast(theMessage); if (anAppError) { emit errorOccurred(QString::fromLatin1(anAppError->description())); - myErrorDlg->show(); - myErrorDlg->raise(); - myErrorDlg->activateWindow(); } }