diff --git a/src/DockAreaTabBar.cpp b/src/DockAreaTabBar.cpp index 81307d0..cf1cb09 100644 --- a/src/DockAreaTabBar.cpp +++ b/src/DockAreaTabBar.cpp @@ -473,6 +473,15 @@ bool CDockAreaTabBar::eventFilter(QObject *watched, QEvent *event) updateGeometry(); break; + // Manage wheel event + case QEvent::Wheel: + // Ignore wheel events if tab is currently dragged + if (Tab->dragState() == DraggingInactive) + { + wheelEvent((QWheelEvent* )event); + } + break; + default: break; } diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index aa6d16d..b3828d3 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include #include diff --git a/src/DockWidgetTab.cpp b/src/DockWidgetTab.cpp index 962de17..654c000 100644 --- a/src/DockWidgetTab.cpp +++ b/src/DockWidgetTab.cpp @@ -789,6 +789,13 @@ bool CDockWidgetTab::event(QEvent *e) } +//============================================================================ +eDragState CDockWidgetTab::dragState() const +{ + return d->DragState; +} + + //============================================================================ void CDockWidgetTab::onDockWidgetFeaturesChanged() { diff --git a/src/DockWidgetTab.h b/src/DockWidgetTab.h index 0b5ba71..973a1ad 100644 --- a/src/DockWidgetTab.h +++ b/src/DockWidgetTab.h @@ -178,6 +178,12 @@ public: */ void setIconSize(const QSize& Size); + /** + * Returns the current drag state of this tab. + * Use this function to determine if the tab is currently being dragged + */ + eDragState dragState() const; + public Q_SLOTS: virtual void setVisible(bool visible) override;