Browse Source

Make sure the tab index is correct

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
a48ef3f94f
  1. 2
      src/properties/proptabbar.cpp

2
src/properties/proptabbar.cpp

@ -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…
Cancel
Save