Fixed startFloating() for FloatingDockContainer if only one DockArea is visble

This commit is contained in:
Uwe Kindler 2017-04-01 22:31:24 +02:00
parent 844c853768
commit 051c379e4a
3 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,8 @@ protected:
// If this is the last dock area in a dock container it does not make
// sense to move it to a new floating widget and leave this one
// empty
if (m_DockArea->dockContainer()->isFloating() && m_DockArea->dockContainer()->dockAreaCount() == 1)
if (m_DockArea->dockContainer()->isFloating()
&& m_DockArea->dockContainer()->visibleDockAreaCount() == 1)
{
return;
}

View File

@ -93,7 +93,6 @@ static QPixmap createDropIndicatorPixmap(const QPalette& pal, const QSizeF& size
if (CDockOverlay::ModeContainerOverlay == Mode && DockWidgetArea != CenterDockWidgetArea)
{
baseRect = areaRect;
areaRect = QRectF();
}
p.fillRect(baseRect, backgroundColor);

View File

@ -167,7 +167,7 @@ bool DockWidgetTitleBarPrivate::startFloating()
// then it does not make any sense, to make if floating because
// it is already floating
if (DockWidget->dockContainer()->isFloating()
&& (DockWidget->dockContainer()->dockAreaCount() == 1)
&& (DockWidget->dockContainer()->visibleDockAreaCount() == 1)
&& (DockWidget->dockAreaWidget()->count() == 1))
{
return false;