mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Make sure the tab index is correct
This commit is contained in:
@@ -99,6 +99,8 @@ int PropTabBar::currentIndex() const
|
||||
|
||||
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(index < 0 || m_currentIndex == index) {
|
||||
if(m_currentIndex >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user