From 036abd48528fbe4c3cb6f84081c667ffe1d68ab7 Mon Sep 17 00:00:00 2001 From: Cranken Date: Sat, 29 Sep 2018 22:30:31 +0200 Subject: [PATCH] Don't switch tab if only right mouse is pressed on other tab. --- src/widgets/helper/NotebookTab.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/widgets/helper/NotebookTab.cpp b/src/widgets/helper/NotebookTab.cpp index 8dd399c0e..760799b07 100644 --- a/src/widgets/helper/NotebookTab.cpp +++ b/src/widgets/helper/NotebookTab.cpp @@ -357,12 +357,14 @@ bool NotebookTab::shouldDrawXButton() void NotebookTab::mousePressEvent(QMouseEvent *event) { - this->mouseDown_ = true; - this->mouseDownX_ = this->getXRect().contains(event->pos()); + if (event->button() == Qt::LeftButton) { + this->mouseDown_ = true; + this->mouseDownX_ = this->getXRect().contains(event->pos()); - this->update(); + this->update(); - this->notebook_->select(page); + this->notebook_->select(page); + } if (this->notebook_->getAllowUserTabManagement()) { switch (event->button()) {