diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index bc8da127a6..2fb06a8367 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -2003,11 +2003,6 @@ namespace AzQtComponents clearDraggingState(); } - if (QApplication::overrideCursor()) - { - QApplication::restoreOverrideCursor(); - } - return true; } @@ -2385,11 +2380,6 @@ namespace AzQtComponents */ void FancyDocking::dropDockWidget(QDockWidget* dock, QWidget* onto, Qt::DockWidgetArea area) { - if (QApplication::overrideCursor()) - { - QApplication::restoreOverrideCursor(); - } - // If the dock widget we are dropping is currently a tab, we need to retrieve it from // the tab widget, and remove it as a tab. We also need to remove its item from our // cache of widget <-> tab container since we are moving it somewhere else. @@ -3573,6 +3563,11 @@ namespace AzQtComponents */ void FancyDocking::clearDraggingState() { + if (QApplication::overrideCursor()) + { + QApplication::restoreOverrideCursor(); + } + m_ghostWidget->hide(); // Release the mouse and keyboard from our main window since we grab them when we start dragging diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TabWidget.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TabWidget.cpp index 121f35db61..a0006d7979 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TabWidget.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/TabWidget.cpp @@ -464,6 +464,11 @@ namespace AzQtComponents { if (mouseEvent->buttons() & Qt::LeftButton) { + if (!QApplication::overrideCursor() || *QApplication::overrideCursor() != m_dragCursor) + { + QApplication::setOverrideCursor(m_dragCursor); + } + m_lastMousePress = mouseEvent->pos(); } @@ -478,6 +483,7 @@ namespace AzQtComponents // selected tab is moved around. The close button is not explicitly rendered for the // moved tab during this operation. We need to make sure not to set it visible again // while the tab is moving. This flag makes sure it happens. + m_movingTab = true; }