mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 21:38:45 -04:00
Merge pull request #343 from kiwix/close-tab-scroll
closing a tab keeps the scroll position of the right tab
This commit is contained in:
commit
a4844b6aea
@ -252,11 +252,10 @@ void TabBar::closeTab(int index)
|
||||
|
||||
void TabBar::setSelectionBehaviorOnRemove(int index)
|
||||
{
|
||||
if (index == count() - 2)
|
||||
{
|
||||
QTabBar::setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab);
|
||||
if (index == count() - 2) {
|
||||
setCurrentIndex(0);
|
||||
} else {
|
||||
QTabBar::setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
|
||||
setCurrentIndex(index + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user