summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-03-24 01:54:18 +0100
committerPetr Mrázek <peterix@gmail.com>2014-03-24 01:54:18 +0100
commit9617326cf8f9f70d3d1e7e08809617a1818c1c0e (patch)
treeb6997b1abfcc0ebe855c54023061056b10f6f06b /gui
parentb60fbf87aba879b8275baf35caaaa797569ab73c (diff)
downloadMultiMC-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.
Diffstat (limited to 'gui')
-rw-r--r--gui/ConsoleWindow.cpp6
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());