mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Improve coding style
This commit is contained in:
@@ -122,8 +122,10 @@ 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) {
|
||||
if ((index < 0) || (m_currentIndex == index))
|
||||
{
|
||||
if (m_currentIndex >= 0)
|
||||
{
|
||||
m_btnGroup->button(m_currentIndex)->setDown(false);
|
||||
m_currentIndex = -1;
|
||||
emit visibilityToggled(false);
|
||||
@@ -131,10 +133,12 @@ void PropTabBar::setCurrentIndex(int index)
|
||||
return;
|
||||
}
|
||||
// Unselect previous tab
|
||||
if (m_currentIndex >= 0) {
|
||||
if (m_currentIndex >= 0)
|
||||
{
|
||||
m_btnGroup->button(m_currentIndex)->setDown(false);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
// Nothing was selected, show!
|
||||
emit visibilityToggled(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user