mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-26 06:12:17 -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)
|
void TabBar::setSelectionBehaviorOnRemove(int index)
|
||||||
{
|
{
|
||||||
if (index == count() - 2)
|
if (index == count() - 2) {
|
||||||
{
|
setCurrentIndex(0);
|
||||||
QTabBar::setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab);
|
|
||||||
} else {
|
} else {
|
||||||
QTabBar::setSelectionBehaviorOnRemove(QTabBar::SelectRightTab);
|
setCurrentIndex(index + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user