{
qDebug() << __PRETTY_FUNCTION__;
- if (!m_loggedIn)
- m_tabbedPanel->closePanel();
-
m_tabbedPanel->setTabsEnabled(m_situareTabsIndexes, m_loggedIn);
}
QButtonGroup *tabs = m_panelTabBar->tabs();
foreach (int tabIndex, tabIndexes) {
-
QAbstractButton *tabButton = tabs->button(tabIndex);
- if (tabButton)
+ if (tabButton) {
+ if (tabButton == tabs->checkedButton())
+ closePanel();
+
tabButton->setEnabled(enabled);
+ }
}
}
/**
* @brief Sets tabs enabled.
*
+ * If disabled tab is currently selected, panel will be closed also
* @param tabIndexes tab indexes to set
* @param enabled true if should be enabled, false otherwise
*/