Implemented custom close handling
This commit is contained in:
@@ -478,7 +478,14 @@ void CDockAreaTabBar::onCloseOtherTabsRequested()
|
||||
int Offset = Tab->dockWidget()->features().testFlag(
|
||||
CDockWidget::DockWidgetDeleteOnClose) ? 1 : 0;
|
||||
closeTab(i);
|
||||
i -= Offset;
|
||||
|
||||
// If the the dock widget blocks closing, i.e. if the flag
|
||||
// CustomCloseHandling is set, and the dock widget is still open,
|
||||
// then we do not need to correct the index
|
||||
if (Tab->dockWidget()->isClosed())
|
||||
{
|
||||
i -= Offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -569,7 +576,7 @@ void CDockAreaTabBar::closeTab(int Index)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Tab->hide();
|
||||
//Tab->hide();
|
||||
emit tabCloseRequested(Index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user