Fixed issue with DCopy ide exception

git-svn-id: svn://ultimatepp.org/upp/trunk@9610 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-03-18 14:54:17 +00:00
parent 71c309621c
commit 7424b9e61c
2 changed files with 12 additions and 10 deletions

View file

@ -2388,7 +2388,8 @@ void ArrayCtrl::SortB(const Vector<int>& o)
void ArrayCtrl::ReArrange(const Vector<int>& order) void ArrayCtrl::ReArrange(const Vector<int>& order)
{ {
CHECK(KillCursor()); KillCursor();
ClearSelection();
ClearCache(); ClearCache();
SortA(); SortA();
SortB(order); SortB(order);
@ -2397,7 +2398,8 @@ void ArrayCtrl::ReArrange(const Vector<int>& order)
} }
void ArrayCtrl::Sort(const ArrayCtrl::Order& order) { void ArrayCtrl::Sort(const ArrayCtrl::Order& order) {
CHECK(KillCursor()); KillCursor();
ClearSelection();
ClearCache(); ClearCache();
SortPredicate sp; SortPredicate sp;
sp.order = &order; sp.order = &order;
@ -2413,7 +2415,8 @@ void ArrayCtrl::Sort(const ArrayCtrl::Order& order) {
void ArrayCtrl::Sort(int from, int count, Gate2<int, int> order) void ArrayCtrl::Sort(int from, int count, Gate2<int, int> order)
{ {
CHECK(KillCursor()); KillCursor();
ClearSelection();
ClearCache(); ClearCache();
Vector<int> h; Vector<int> h;
for(int i = 0; i < array.GetCount(); i++) for(int i = 0; i < array.GetCount(); i++)

View file

@ -68,15 +68,14 @@ void AssistEditor::DCopy()
if(cpp.GetCount() == 0) { // scan for THISBACKs if(cpp.GetCount() == 0) { // scan for THISBACKs
Index<String> id; Index<String> id;
CParser p(txt); CParser p(txt);
while(!p.IsEof()) { try {
try { while(!p.IsEof()) {
if(p.Id("THISBACK") && p.Char('(')) { if(p.Id("THISBACK") && p.Char('('))
id.FindAdd(p.ReadId()); id.FindAdd(p.ReadId());
} p.SkipTerm();
} }
catch(CParser::Error) { }
} catch(CParser::Error) {
p.SkipTerm();
} }
for(int i = 0; i < id.GetCount(); i++) for(int i = 0; i < id.GetCount(); i++)
r << "\tvoid " << id[i] << "();\n"; r << "\tvoid " << id[i] << "();\n";