summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qtoolbar.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-08-16 20:28:31 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-08-16 22:36:35 +0200
commit3965d52ad5a6376d593026a87831026a8a5f3469 (patch)
tree912d9d3fbd9d3c68ee8344b5a0ce5514691f241f /src/widgets/widgets/qtoolbar.cpp
parent6e9f989eb61dd39562c47707cbd70d7f514b6e54 (diff)
QTabBar: don't make current tab visible while tab bar is invisible
When changing the current index while the tab bar is not visible, calculating the necessary scroll offset might result in wrong results if the tab bar still has an old size. When the tab bar then gets shown and resized, the scroll wouldn't be corrected, potentially leaving tabs unnecessarily scrolled out. We don't need to make the current index visible if the tab bar itself is not visible, it's enough to flag the layout as dirty so that the next show event (which either way makes the then current index visible) triggers a laying out of the tab bar tabs. Amends e851d4c06154bf02b23030ff1f7024a8b9edf874. Fixes: QTBUG-115109 Task-number: QTBUG-113140 Pick-to: 6.6 6.5 Change-Id: I3d8633f9f8b907a36190123839a6104a17bfe138 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/widgets/widgets/qtoolbar.cpp')
0 files changed, 0 insertions, 0 deletions