From d2bb73ffb287e54854696ef9fa684696593dbeea Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Thu, 7 May 2015 12:59:01 +0200 Subject: [PATCH] ProjectExplorer: Fix to eager clearing of output window The window was cleared even if the option to clear it wasn't selected. Moving the cursor to the end, has the side effect of clearing the selection, so do that always. Change-Id: I6b61981f46394c61e61066aa8033c7e3391e6c07 Task-number: QTCREATORBUG-14410 Reviewed-by: Tobias Hunger Reviewed-by: Eike Ziller --- src/plugins/coreplugin/outputwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 030857a7639..e19505fd442 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -347,8 +347,7 @@ void OutputWindow::grayOutOldContent() (bkgFactor * bkgColor.blue() + fgdFactor * fgdColor.blue()) )); d->cursor.mergeCharFormat(format); - if (!d->cursor.atEnd()) - d->cursor.movePosition(QTextCursor::End); + d->cursor.movePosition(QTextCursor::End); d->cursor.setCharFormat(endFormat); d->cursor.insertBlock(QTextBlockFormat()); }