From 9617326cf8f9f70d3d1e7e08809617a1818c1c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 24 Mar 2014 01:54:18 +0100 Subject: Raise console window when it's open, but hidden behind other windows. --- gui/ConsoleWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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()); -- cgit v1.2.3