From 80019565cbefd8fdff1e84808e5d90ecdd4603d9 Mon Sep 17 00:00:00 2001 From: sbh Date: Thu, 29 May 2014 09:55:12 +0400 Subject: [PATCH] Call show method of the error dialog in it's thread. Fixes #79 --- src/XGUI/XGUI_ErrorDialog.cpp | 6 +++++- src/XGUI/XGUI_Workshop.cpp | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) 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(); } } -- 2.39.2