From e336cab5ae3a3d9ca42c6e44341bf6a53c1825bf Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 16 Feb 2017 11:57:08 +0000 Subject: [PATCH] Add the ability to selectively disallow certain panels from floating --- qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp | 5 +++++ qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp index 1775cebed..478d49731 100644 --- a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp +++ b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp @@ -811,6 +811,11 @@ void ToolWindowManager::finishDrag() { return; } if (m_suggestions.isEmpty()) { + bool allowFloat = m_allowFloatingWindow; + + for(QWidget *w : m_draggedToolWindows) + allowFloat &= !(toolWindowProperties(w) & DisallowFloatWindow); + if (m_allowFloatingWindow) { QRect r; diff --git a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.h b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.h index 8b6050f00..5ca2323ee 100644 --- a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.h +++ b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.h @@ -115,6 +115,8 @@ public: DisableDraggableTab = 0x4, //! When the tool window is closed, hide it instead of removing it HideOnClose = 0x8, + //! Don't allow this tool window to be floated + DisallowFloatWindow = 0x10, }; //! Type of AreaReference.