summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 5044d2758..dee1640ad 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -106,9 +106,9 @@ void TabbedArea::enableScrollButtons(const bool enable)
if (mEnableScrollButtons && !enable)
{
if (mArrowButton[0])
- add(mArrowButton[0]);
+ remove(mArrowButton[0]);
if (mArrowButton[1])
- add(mArrowButton[1]);
+ remove(mArrowButton[1]);
}
else if (!mEnableScrollButtons && enable)
{
@@ -117,6 +117,7 @@ void TabbedArea::enableScrollButtons(const bool enable)
if (mArrowButton[1])
add(mArrowButton[1]);
}
+ mEnableScrollButtons = enable;
}
int TabbedArea::getNumberOfTabs() const
@@ -519,7 +520,8 @@ void TabbedArea::adjustTabPositions()
maxTabHeight = tab->getHeight();
}
- int x = mArrowButton[0]->isVisible() ? mArrowButton[0]->getWidth() : 0;
+ int x = (mEnableScrollButtons && mArrowButton[0]->isVisible())
+ ? mArrowButton[0]->getWidth() : 0;
for (size_t i = mTabScrollIndex; i < sz; ++i)
{
Tab *const tab = mTabs[i].first;