Fixed proper hiding of dock areas without any visible content when dragging out singkle widgets, prevente single dock widget from dragging if it is the last dock widget in a floating widget
This commit is contained in:
@@ -91,11 +91,6 @@ struct DockWidgetPrivate
|
||||
*/
|
||||
void hideDockWidget();
|
||||
|
||||
/**
|
||||
* Hides a parent splitter if all dock widgets in the splitter are closed
|
||||
*/
|
||||
void hideEmptyParentSplitters();
|
||||
|
||||
/**
|
||||
* Hides a dock area if all dock widgets in the area are closed.
|
||||
* This function updates the current selected tab and hides the parent
|
||||
@@ -103,12 +98,6 @@ struct DockWidgetPrivate
|
||||
*/
|
||||
void updateParentDockArea();
|
||||
|
||||
/**
|
||||
* Hides a floating widget if all dock areas are empty - that means,
|
||||
* if all dock widgets in all dock areas are closed
|
||||
*/
|
||||
void hideEmptyFloatingWidget();
|
||||
|
||||
/**
|
||||
* Setup the top tool bar
|
||||
*/
|
||||
@@ -165,23 +154,6 @@ void DockWidgetPrivate::hideDockWidget()
|
||||
{
|
||||
TabWidget->hide();
|
||||
updateParentDockArea();
|
||||
hideEmptyParentSplitters();
|
||||
hideEmptyFloatingWidget();
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
void DockWidgetPrivate::hideEmptyParentSplitters()
|
||||
{
|
||||
auto Splitter = internal::findParent<CDockSplitter*>(_this);
|
||||
while (Splitter && Splitter->isVisible())
|
||||
{
|
||||
if (!Splitter->hasVisibleContent())
|
||||
{
|
||||
Splitter->hide();
|
||||
}
|
||||
Splitter = internal::findParent<CDockSplitter*>(Splitter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,19 +167,7 @@ void DockWidgetPrivate::updateParentDockArea()
|
||||
}
|
||||
else
|
||||
{
|
||||
DockArea->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
void DockWidgetPrivate::hideEmptyFloatingWidget()
|
||||
{
|
||||
CDockContainerWidget* Container = _this->dockContainer();
|
||||
if (Container->isFloating() && Container->openedDockAreas().isEmpty())
|
||||
{
|
||||
CFloatingDockContainer* FloatingWidget = internal::findParent<CFloatingDockContainer*>(Container);
|
||||
FloatingWidget->hide();
|
||||
DockArea->hideAreaWithNoVisibleContent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +345,7 @@ bool CDockWidget::isFloating() const
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dockContainer()->dockArea(0)->count() != 1)
|
||||
if (dockContainer()->dockArea(0)->dockWidgetsCount() != 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user