From 9ab0c1d9152f29d439b5ef84f6bf93a783dd711f Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 22 Jul 2006 21:23:49 +0000 Subject: Clear the active domain when (re)opening the launcher dialog. This fixes bug #1523050. svn-id: r23571 --- gui/launcher.cpp | 8 ++++++++ gui/launcher.h | 1 + 2 files changed, 9 insertions(+) diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 8e4d67ba26..f212b4828b 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -540,6 +540,14 @@ LauncherDialog::~LauncherDialog() { delete _browser; } +void LauncherDialog::open() { + // Clear the active domain, in case we return to the dialog from a + // failure to launch a game. Otherwise, pressing ESC will attempt to + // re-launch the same game again. + ConfMan.setActiveDomain(""); + Dialog::open(); +} + void LauncherDialog::close() { // Save last selection const int sel = _list->getSelected(); diff --git a/gui/launcher.h b/gui/launcher.h index 7b456a2dbd..a8c76f4cfe 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -56,6 +56,7 @@ protected: void updateListing(); void updateButtons(); + void open(); void close(); virtual void addGame(); void removeGame(int item); -- cgit v1.2.3