mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-31 22:02:58 -06:00
Yet another A++ fix
git-svn-id: svn://ultimatepp.org/upp/trunk@468 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
242c12a938
commit
a5b6bb2b7f
1 changed files with 8 additions and 7 deletions
|
|
@ -330,10 +330,10 @@ void AssistEditor::GatherItems(const String& type, bool nom, Index<String>& in_t
|
|||
in_types.Drop();
|
||||
}
|
||||
|
||||
struct CppItemInfoOrder {
|
||||
bool operator()(const CppItemInfo& a, const CppItemInfo& b) const {
|
||||
return CombineCompare(a.name, b.name)(a.natural, b.natural) < 0;
|
||||
}
|
||||
int CppItemInfoOrder(const Value& va, const Value& vb) {
|
||||
const CppItemInfo& a = ValueTo<CppItemInfo>(va);
|
||||
const CppItemInfo& b = ValueTo<CppItemInfo>(vb);
|
||||
return CombineCompare(a.name, b.name)(a.natural, b.natural);
|
||||
};
|
||||
|
||||
void AssistEditor::CloseAssist()
|
||||
|
|
@ -490,8 +490,8 @@ void AssistEditor::SyncAssist()
|
|||
name = ReadIdBack(GetCursor());
|
||||
assist.Clear();
|
||||
int typei = type.GetCursor() - 1;
|
||||
VectorMap<String, int> over;
|
||||
for(int p = 0; p < 2; p++)
|
||||
for(int p = 0; p < 2; p++) {
|
||||
VectorMap<String, int> over;
|
||||
for(int i = 0; i < assist_item.GetCount(); i++) {
|
||||
const CppItemInfo& m = assist_item[i];
|
||||
if((typei < 0 || m.typei == typei) &&
|
||||
|
|
@ -506,6 +506,8 @@ void AssistEditor::SyncAssist()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
assist.Sort(0, CppItemInfoOrder);
|
||||
}
|
||||
|
||||
void AssistEditor::Assist()
|
||||
|
|
@ -536,7 +538,6 @@ void AssistEditor::Assist()
|
|||
}
|
||||
if(assist_item.GetCount() == 0)
|
||||
return;
|
||||
Sort(assist_item, CppItemInfoOrder());
|
||||
PopUpAssist();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue