mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Fixed DockWidgetTab to provide the right size when starting floating
This commit is contained in:
parent
79831d482b
commit
52a64350e6
@ -241,7 +241,6 @@ bool DockWidgetTabPrivate::startFloating(eDragState DraggingState)
|
||||
|
||||
ADS_PRINT("startFloating");
|
||||
DragState = DraggingState;
|
||||
QSize Size = DockArea->size();
|
||||
IFloatingWidget* FloatingWidget = nullptr;
|
||||
bool OpaqueUndocking = CDockManager::configFlags().testFlag(CDockManager::OpaqueUndocking) ||
|
||||
(DraggingFloatingWidget != DraggingState);
|
||||
@ -249,13 +248,16 @@ bool DockWidgetTabPrivate::startFloating(eDragState DraggingState)
|
||||
// If section widget has multiple tabs, we take only one tab
|
||||
// If it has only one single tab, we can move the complete
|
||||
// dock area into floating widget
|
||||
QSize Size;
|
||||
if (DockArea->dockWidgetsCount() > 1)
|
||||
{
|
||||
FloatingWidget = createFloatingWidget(DockWidget, OpaqueUndocking);
|
||||
Size = DockWidget->size();
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingWidget = createFloatingWidget(DockArea, OpaqueUndocking);
|
||||
Size = DockArea->size();
|
||||
}
|
||||
|
||||
if (DraggingFloatingWidget == DraggingState)
|
||||
|
Loading…
Reference in New Issue
Block a user