Improved support for AutoHideTab drag and drop
This commit is contained in:
@@ -1229,17 +1229,12 @@ void CDockWidget::setAutoHide(bool Enable, SideBarLocation Location)
|
||||
auto OldOrientation = AutoHideContainer->orientation();
|
||||
auto SideBar = dockContainer()->autoHideSideBar(Location);
|
||||
SideBar->addAutoHideWidget(AutoHideContainer);
|
||||
// If we move a horizontal auto hide container to a vertical position
|
||||
// then we resize it to the orginal dock widget size, to avoid
|
||||
// an extremely streched dock widget after insertion
|
||||
if (SideBar->orientation() != OldOrientation)
|
||||
{
|
||||
auto OriginalSize = AutoHideContainer->originalDockWidgetSize();
|
||||
if (SideBar->orientation() == Qt::Horizontal)
|
||||
{
|
||||
AutoHideContainer->setSize(OriginalSize.height());
|
||||
}
|
||||
else
|
||||
{
|
||||
AutoHideContainer->setSize(OriginalSize.width());
|
||||
}
|
||||
AutoHideContainer->resetToInitialDockWidgetSize();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user