From 848a61440cf88e840642b402825e3c06ebdd5ba9 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sun, 7 Jan 2018 13:17:05 +0100 Subject: [PATCH] TabWidget: Hide closed tabs button when there are no closed tabs --- src/lib/tabwidget/tabwidget.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib/tabwidget/tabwidget.cpp b/src/lib/tabwidget/tabwidget.cpp index e02c1a592..30be26b1d 100644 --- a/src/lib/tabwidget/tabwidget.cpp +++ b/src/lib/tabwidget/tabwidget.cpp @@ -192,11 +192,7 @@ bool TabWidget::validIndex(int index) const void TabWidget::updateClosedTabsButton() { - if (!m_showClosedTabsButton) { - m_buttonClosedTabs->hide(); - } - - m_buttonClosedTabs->setEnabled(canRestoreTab()); + m_buttonClosedTabs->setVisible(m_showClosedTabsButton && canRestoreTab()); } bool TabWidget::isCurrentTabFresh() const @@ -217,7 +213,6 @@ void TabWidget::tabBarOverFlowChanged(bool overflowed) // Show buttons displayed outside tabbar (corner widgets) m_buttonAddTab2->setVisible(overflowed); m_buttonListTabs->setVisible(overflowed); - m_buttonClosedTabs->setVisible(m_showClosedTabsButton); } void TabWidget::moveAddTabButton(int posX)