From a0fb6630e7f4744501c77b3797c88e9571984180 Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 23 May 2018 12:35:10 +0200 Subject: [PATCH] Fixes #406 --- src/widgets/helper/notebooktab.cpp | 8 +++++++- src/widgets/splitcontainer.cpp | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/widgets/helper/notebooktab.cpp b/src/widgets/helper/notebooktab.cpp index 51cf3bcdb..6fcb6747e 100644 --- a/src/widgets/helper/notebooktab.cpp +++ b/src/widgets/helper/notebooktab.cpp @@ -354,8 +354,14 @@ void NotebookTab::leaveEvent(QEvent *) this->update(); } -void NotebookTab::dragEnterEvent(QDragEnterEvent *) +void NotebookTab::dragEnterEvent(QDragEnterEvent *event) { + if (!event->mimeData()->hasFormat("chatterino/split")) + return; + + if (!SplitContainer::isDraggingSplit) + return; + if (this->notebook->getAllowUserTabManagement()) { this->notebook->select(this->page); } diff --git a/src/widgets/splitcontainer.cpp b/src/widgets/splitcontainer.cpp index 106e92424..ec5dd8f64 100644 --- a/src/widgets/splitcontainer.cpp +++ b/src/widgets/splitcontainer.cpp @@ -321,9 +321,8 @@ void SplitContainer::dragEnterEvent(QDragEnterEvent *event) if (!event->mimeData()->hasFormat("chatterino/split")) return; - if (!SplitContainer::isDraggingSplit) { + if (!SplitContainer::isDraggingSplit) return; - } this->isDragging = true; this->layout();