forked from qt-creator/qt-creator
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 <daniel.teske@digia.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user