Info in ObjectList: Settings should be above the new info items, info items are selectable

This commit is contained in:
Lukas Matena 2021-04-19 11:51:56 +02:00
parent 548ceb7acc
commit df3fb31268
2 changed files with 9 additions and 12 deletions

View file

@ -377,13 +377,7 @@ wxDataViewItem ObjectDataViewModel::AddSettingsChild(const wxDataViewItem &paren
const auto node = new ObjectDataViewModelNode(root, itSettings);
// In case there are some info items, append after them.
size_t i = 0;
for (i = 0; i<root->GetChildCount(); ++i)
if (root->GetNthChild(i)->GetType() != itInfo)
break;
root->Insert(node, i);
root->Insert(node, 0);
// notify control
const wxDataViewItem child((void*)node);
ItemAdded(parent_item, child);