Improve coding style

This commit is contained in:
Vladimir Golovnev (Glassez)
2020-11-16 10:02:11 +03:00
parent acad35c5bc
commit c41df9ffbd
147 changed files with 4454 additions and 2227 deletions

View File

@@ -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);
}