diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-03-24 01:54:18 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-03-24 01:54:18 +0100 |
commit | 9617326cf8f9f70d3d1e7e08809617a1818c1c0e (patch) | |
tree | b6997b1abfcc0ebe855c54023061056b10f6f06b | |
parent | b60fbf87aba879b8275baf35caaaa797569ab73c (diff) | |
download | MultiMC-9617326cf8f9f70d3d1e7e08809617a1818c1c0e.tar MultiMC-9617326cf8f9f70d3d1e7e08809617a1818c1c0e.tar.gz MultiMC-9617326cf8f9f70d3d1e7e08809617a1818c1c0e.tar.lz MultiMC-9617326cf8f9f70d3d1e7e08809617a1818c1c0e.tar.xz MultiMC-9617326cf8f9f70d3d1e7e08809617a1818c1c0e.zip |
Raise console window when it's open, but hidden behind other windows.
-rw-r--r-- | gui/ConsoleWindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp index d11e8aff..621f035f 100644 --- a/gui/ConsoleWindow.cpp +++ b/gui/ConsoleWindow.cpp @@ -186,6 +186,11 @@ void ConsoleWindow::toggleConsole() QScrollBar *bar = ui->text->verticalScrollBar(); if (isVisible()) { + if(!isActiveWindow()) + { + activateWindow(); + return; + } int max_bar = bar->maximum(); int val_bar = m_last_scroll_value = bar->value(); m_scroll_active = (max_bar - val_bar) <= 1; @@ -194,6 +199,7 @@ void ConsoleWindow::toggleConsole() else { show(); + isTopLevel(); if (m_scroll_active) { bar->setValue(bar->maximum()); |