Started implementing VisibleDockAreaCount cache

This commit is contained in:
Uwe Kindler
2018-11-01 07:53:54 +01:00
parent 268f8655a1
commit 5e6c82b68d
6 changed files with 61 additions and 45 deletions

View File

@@ -410,7 +410,7 @@ void CDockAreaWidget::removeDockWidget(CDockWidget* DockWidget)
//============================================================================
void CDockAreaWidget::hideAreaWithNoVisibleContent()
{
this->hide();
this->toggleView(false);
// Hide empty parent splitter
auto Splitter = internal::findParent<CDockSplitter*>(this);
@@ -433,16 +433,6 @@ void CDockAreaWidget::hideAreaWithNoVisibleContent()
}
//============================================================================
void CDockAreaWidget::hideAreaIfNoVisibleContent()
{
if (openedDockWidgets().isEmpty())
{
hideAreaIfNoVisibleContent();
}
}
//============================================================================
void CDockAreaWidget::onTabCloseRequested(int Index)
{
@@ -668,18 +658,11 @@ CDockWidget::DockWidgetFeatures CDockAreaWidget::features() const
//============================================================================
void CDockAreaWidget::setVisible(bool visible)
void CDockAreaWidget::toggleView(bool Open)
{
Super::setVisible(visible);
QString FirstDockWidgetLabel;
if (dockWidgetsCount())
{
FirstDockWidgetLabel = dockWidget(0)->windowTitle();
}
qDebug() << "CDockAreaWidget::setVisible " << visible << " " << FirstDockWidgetLabel
<< " count: " << dockWidgetsCount() << " open count: " << openDockWidgetsCount();
setVisible(Open);
emit viewToggled(Open);
}
} // namespace ads
//---------------------------------------------------------------------------