mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Make sure the tab index is correct
This commit is contained in:
parent
15ab369f62
commit
a48ef3f94f
1 changed files with 2 additions and 0 deletions
|
@ -99,6 +99,8 @@ int PropTabBar::currentIndex() const
|
||||||
|
|
||||||
void PropTabBar::setCurrentIndex(int index)
|
void PropTabBar::setCurrentIndex(int index)
|
||||||
{
|
{
|
||||||
|
if(index >= m_btnGroup->buttons().size())
|
||||||
|
index = 0;
|
||||||
// If asked to hide or if the currently selected tab is clicked
|
// If asked to hide or if the currently selected tab is clicked
|
||||||
if(index < 0 || m_currentIndex == index) {
|
if(index < 0 || m_currentIndex == index) {
|
||||||
if(m_currentIndex >= 0) {
|
if(m_currentIndex >= 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue