diff --git a/uppsrc/TabBar/TabBar.cpp b/uppsrc/TabBar/TabBar.cpp index e1ce47b53..a72a63f57 100644 --- a/uppsrc/TabBar/TabBar.cpp +++ b/uppsrc/TabBar/TabBar.cpp @@ -504,7 +504,7 @@ void TabBar::ContextMenu(Bar& bar) for(int i = 0; i < cnt; i++) { String name = Format("%s (%d)", groups[i].name, groups[i].count); - Bar::Item &it = bar.Add(name, THISBACK1(DoGrouping, i)); + Bar::Item &it = bar.Add(name, THISBACK1(GoGrouping, i)); if(i == group) it.Image(TabBarImg::CHK); if(i == 0 && cnt > 1) @@ -715,7 +715,7 @@ void TabBar::MakeGroups() group--; } -void TabBar::DoGrouping(int n) +void TabBar::GoGrouping(int n) { Value c = GetData(); group = n; @@ -729,6 +729,14 @@ void TabBar::DoGrouping(int n) Refresh(); } +void TabBar::DoGrouping(int n) +{ + group = n; + Repos(); + SyncScrollBar(); +} + + void TabBar::DoCloseGroup(int n) { int cnt = groups.GetCount(); diff --git a/uppsrc/TabBar/TabBar.h b/uppsrc/TabBar/TabBar.h index 1e66f8dbe..f710db095 100644 --- a/uppsrc/TabBar/TabBar.h +++ b/uppsrc/TabBar/TabBar.h @@ -370,6 +370,7 @@ protected: void MakeGroups(); int FindGroup(const String& g) const; void CloseAll(int exception); + void GoGrouping(int n); void DoGrouping(int n); void DoCloseGroup(int n); void NewGroup(const String& name); diff --git a/uppsrc/ide/idefile.cpp b/uppsrc/ide/idefile.cpp index 7255eacb3..5bc77da09 100644 --- a/uppsrc/ide/idefile.cpp +++ b/uppsrc/ide/idefile.cpp @@ -70,7 +70,6 @@ void Ide::FileCursor() String p = GetActiveFileName(); if(p != HELPNAME) p = GetActiveFilePath(); - EditFile0(p, f.charset ? f.charset : actual.charset ? actual.charset : default_charset, false, headername); }