Fix broken autoscrolling when switching to compile output mode

In certain situations, reported on irc.
This commit is contained in:
dt
2009-04-29 14:23:54 +02:00
parent 918cac90c8
commit 0f46f87118
2 changed files with 5 additions and 3 deletions

View File

@@ -384,7 +384,7 @@ void OutputPaneManager::ensurePageVisible(int idx)
} }
} }
// Slot connected to showPage signal of each page
void OutputPaneManager::showPage(bool focus) void OutputPaneManager::showPage(bool focus)
{ {
int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender())); int idx = findIndexForPage(qobject_cast<IOutputPane*>(sender()));

View File

@@ -36,6 +36,7 @@
#include <QtGui/QKeyEvent> #include <QtGui/QKeyEvent>
#include <QtGui/QIcon> #include <QtGui/QIcon>
#include <QtGui/QTextEdit> #include <QtGui/QTextEdit>
#include <QtGui/QScrollBar>
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal; using namespace ProjectExplorer::Internal;
@@ -82,9 +83,10 @@ void CompileOutputWindow::clearContents()
m_textEdit->clear(); m_textEdit->clear();
} }
void CompileOutputWindow::visibilityChanged(bool /* b */) void CompileOutputWindow::visibilityChanged(bool b)
{ {
if (b)
m_textEdit->verticalScrollBar()->setValue(m_textEdit->verticalScrollBar()->maximum());
} }
int CompileOutputWindow::priorityInStatusBar() const int CompileOutputWindow::priorityInStatusBar() const