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)
{
CHECK(KillCursor());
KillCursor();
ClearSelection();
ClearCache();
SortA();
SortB(order);
@ -2397,7 +2398,8 @@ void ArrayCtrl::ReArrange(const Vector<int>& order)
}
void ArrayCtrl::Sort(const ArrayCtrl::Order& order) {
CHECK(KillCursor());
KillCursor();
ClearSelection();
ClearCache();
SortPredicate sp;
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)
{
CHECK(KillCursor());
KillCursor();
ClearSelection();
ClearCache();
Vector<int> h;
for(int i = 0; i < array.GetCount(); i++)

View file

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