Skip to content

Commit

Permalink
auto-dismiss existing modal dialog before showing message box
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Feb 8, 2013
1 parent dc2e866 commit 0e7a4d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cpp/desktop/DesktopGwtCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ int GwtCallback::showMessageBox(int type,
if (pUpdateDialog != NULL)
pUpdateDialog->close();

// cancel other message box if it's visible
QMessageBox* pMsgBox = qobject_cast<QMessageBox*>(
QApplication::activeModalWidget());
if (pMsgBox != NULL)
pMsgBox->close();

QMessageBox msgBox(safeMessageBoxIcon(static_cast<QMessageBox::Icon>(type)),
caption,
Expand Down

0 comments on commit 0e7a4d8

Please sign in to comment.