mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
TabBar: Fixed id serializing
git-svn-id: svn://ultimatepp.org/upp/trunk@2955 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6d635a8192
commit
0d9ab6010c
2 changed files with 8 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ protected:
|
|||
Vector<Tab> tabs;
|
||||
Vector<int> separators;
|
||||
int active;
|
||||
int id;
|
||||
|
||||
private:
|
||||
int highlight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue