From f9f8ac2a6bcbf8df254a071e53e69ea6e25091e4 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 13 Feb 2014 11:43:40 +0100 Subject: [PATCH] Open documents view: do not switch editor on right-click Right-clicking opens the context menu, which should not switch editors. Task-number: QTCREATORBUG-8178 Change-Id: I9c70ba14fa4f80d3fc90fa80954f9f9417a52a98 Reviewed-by: Daniel Teske --- src/plugins/coreplugin/editormanager/openeditorsview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index 01bf7cab171..7d0dc797791 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -170,15 +170,15 @@ bool OpenEditorsWidget::eventFilter(QObject *obj, QEvent *event) void OpenEditorsWidget::handlePressed(const QModelIndex &index) { - if (index.column() == 0) - activateEditor(index); - else if (index.column() == 1) + if (index.column() == 1) m_delegate->pressedIndex = index; } void OpenEditorsWidget::handleClicked(const QModelIndex &index) { - if (index.column() == 1) { // the funky close button + if (index.column() == 0) { + activateEditor(index); + } else if (index.column() == 1) { // the funky close button closeEditor(index); // work around a bug in itemviews where the delegate wouldn't get the QStyle::State_MouseOver