diff --git a/uppsrc/TabBar/TabBar.cpp b/uppsrc/TabBar/TabBar.cpp index 8a94946dc..a78634322 100644 --- a/uppsrc/TabBar/TabBar.cpp +++ b/uppsrc/TabBar/TabBar.cpp @@ -295,6 +295,7 @@ TabBar::TabBar() { Clear(); + id = 0; display = NULL; crosses = true; crosses_side = RIGHT; @@ -332,6 +333,8 @@ void TabBar::Set(const TabBar& t) { CopyBaseSettings(t); + id = t.id; + tabs.Clear(); tabs <<= t.tabs; groups.Clear(); @@ -375,8 +378,7 @@ void TabBar::CloseAll(int exception) int TabBar::GetNextId() { - static int id = 0; - return ++id; + return id++; } void TabBar::ContextMenu(Bar& bar) @@ -2361,7 +2363,8 @@ void TabBar::Serialize(Stream& s) { int version = 1; s / version; - + + s % id; s % crosses; s % crosses_side; s % grouping; @@ -2387,7 +2390,7 @@ void TabBar::Serialize(Stream& s) groups.SetCount(n); for(int i = 0; i < groups.GetCount(); i++) - s % groups[i]; + s % groups[i]; n = tabs.GetCount(); s % n; diff --git a/uppsrc/TabBar/TabBar.h b/uppsrc/TabBar/TabBar.h index e2c1af413..d42eccc77 100644 --- a/uppsrc/TabBar/TabBar.h +++ b/uppsrc/TabBar/TabBar.h @@ -228,6 +228,7 @@ protected: Vector tabs; Vector separators; int active; + int id; private: int highlight;