summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
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());