From 3d546a4c5da6c133548d77817cb14ec37b104242 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 3 Mar 2010 13:07:27 +0000 Subject: [PATCH] BUGFIX: Only one log window can be opened at a time --- Changelog | 1 + src/GUI.cpp | 9 ++++++++- src/GUI.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 76b8e0596..4a5430bca 100644 --- a/Changelog +++ b/Changelog @@ -13,6 +13,7 @@ - FEATURE: Global transfer information are displayed in the new Web UI status bar - FEATURE: Allow to change the priority of several files at once - FEATURE: Support for multiple scan folders (Patch by Christian Kandeler) + - BUGFIX: Only one log window can be opened at a time - COSMETIC: Improved style management * Mon Jan 18 2010 - Christophe Dumez - v2.1.0 diff --git a/src/GUI.cpp b/src/GUI.cpp index d37b5dad5..017fb3659 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -418,7 +418,11 @@ void GUI::on_actionSet_global_upload_limit_triggered() { } void GUI::on_actionShow_console_triggered() { - new consoleDlg(this, BTSession); + if(!console) { + console = new consoleDlg(this, BTSession); + } else { + console->setFocus(); + } } void GUI::on_actionSet_global_download_limit_triggered() { @@ -921,6 +925,9 @@ void GUI::on_actionOptions_triggered() { if(!options) { options = new options_imp(this); connect(options, SIGNAL(status_changed()), this, SLOT(optionsSaved())); + } else { + // Get focus + options->setFocus(); } } diff --git a/src/GUI.h b/src/GUI.h index 0843a0a50..85dabd5b1 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -55,6 +55,7 @@ class TransferListFiltersWidget; class QSplitter; class PropertiesWidget; class StatusBar; +class consoleDlg; class GUI : public QMainWindow, private Ui::MainWindow{ Q_OBJECT @@ -68,6 +69,7 @@ private: QTabWidget *tabs; StatusBar *status_bar; QPointer options; + QPointer console; QPointer systrayIcon; QPointer systrayCreator; QMenu *myTrayIconMenu;