When recreating tab widget, ensure previous tab is highlighted

This commit is contained in:
craig
2011-12-20 22:31:16 +00:00
parent e23cc29c0c
commit e899ba002f

View File

@@ -669,7 +669,7 @@ void FancyTabWidget::SetMode(Mode mode) {
(*it).index_=index++;
}
bar->setCurrentIndex(stack_->currentIndex());
bar->setCurrentIndex(IndexToTab(stack_->currentIndex()));
connect(bar, SIGNAL(currentChanged(int)), SLOT(ShowWidget(int)));
// use_background_ = true;
@@ -872,7 +872,7 @@ void FancyTabWidget::MakeTabBar(QTabBar::Shape shape, bool text, bool icons,
(*it).index_=index++;
}
bar->setCurrentIndex(stack_->currentIndex());
bar->setCurrentIndex(IndexToTab(stack_->currentIndex()));
connect(bar, SIGNAL(currentChanged(int)), SLOT(ShowWidget(int)));
tab_bar_ = bar;
}