struct GuiView::GuiViewPrivate
{
- std::vector<std::string> tabnames;
+ vector<string> tabnames;
+ string cur_title;
TabWidget* tabWidget;
{
std::vector<string> const & names = theBufferList().getFileNames();
+ string cur_title;
+ if (view()->buffer()) {
+ cur_title = view()->buffer()->fileName();
+ }
+
// avoid unnecessary tabbar rebuild:
// check if something has changed
- if (d.tabnames == names)
+ if (d.tabnames == names && d.cur_title == cur_title)
return;
d.tabnames = names;
+ d.cur_title = cur_title;
QTabBar & tabbar = *d.tabWidget->tabbar;
// remove all tab bars
d.tabWidget->clearTabbar();
- string cur_title;
- if (view()->buffer()) {
- cur_title = view()->buffer()->fileName();
- }
-
// rebuild tabbar and function map from scratch
if (names.size() > 1) {
for(size_t i = 0; i < names.size(); i++) {