Implemented context menu for dock widget tab to close or detach tab or to close all other tabs

This commit is contained in:
Uwe Kindler
2018-11-09 10:07:56 +01:00
parent 854f542164
commit f69af82a49
7 changed files with 86 additions and 14 deletions

View File

@@ -336,10 +336,6 @@ void DockAreaWidgetPrivate::updateCloseButtonState()
return;
}
if (!UpdateCloseButton)
{
return;
}
TitleBar->button(TitleBarButtonClose)->setEnabled(
_this->features().testFlag(CDockWidget::DockWidgetClosable));
UpdateCloseButton = false;
@@ -768,7 +764,10 @@ void CDockAreaWidget::toggleView(bool Open)
void CDockAreaWidget::setVisible(bool Visible)
{
Super::setVisible(Visible);
d->updateCloseButtonState();
if (d->UpdateCloseButton)
{
d->updateCloseButtonState();
}
}