mirror of
https://github.com/KDE/konsole.git
synced 2026-05-03 04:04:18 -04:00
Fix "Show 'New Tab' and 'Close Tab' buttons on tab bar" setting not being
applied correctly on startup. Test for the tab bar being explicitly hidden with isHidden() rather than just isVisible() which will return true if the setting is applied before the container widget is shown. BUG: 162420 CCBUG: 157015 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=810949
This commit is contained in:
@@ -680,33 +680,9 @@ void TabbedViewContainerV2::setFeatures(Features features)
|
||||
{
|
||||
ViewContainer::setFeatures(features);
|
||||
|
||||
const bool tabBarVisible = _tabBar->isVisible();
|
||||
_newTabButton->setVisible(tabBarVisible && (features & QuickNewView));
|
||||
_closeTabButton->setVisible(tabBarVisible && (features & QuickCloseView));
|
||||
#if 0
|
||||
if (features & QuickNewView)
|
||||
{
|
||||
_newTabButton->setHidden(false);
|
||||
_newTabButton->show();
|
||||
}
|
||||
else
|
||||
_newTabButton->setHidden(true);
|
||||
|
||||
if (features & QuickCloseView)
|
||||
{
|
||||
_closeTabButton->setHidden(false);
|
||||
_closeTabButton->show();
|
||||
}
|
||||
else
|
||||
_closeTabButton->setHidden(true);
|
||||
#endif
|
||||
#if 0
|
||||
if (features & QuickCloseView)
|
||||
_tabBar->setCloseButtonEnabled(true);
|
||||
else
|
||||
_tabBar->setCloseButtonEnabled(false);
|
||||
#endif
|
||||
|
||||
const bool tabBarHidden = _tabBar->isHidden();
|
||||
_newTabButton->setVisible(!tabBarHidden && (features & QuickNewView));
|
||||
_closeTabButton->setVisible(!tabBarHidden && (features & QuickCloseView));
|
||||
}
|
||||
void TabbedViewContainerV2::closeCurrentTab()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user