493{
494 Q_UNUSED(index);
495 if (treenode* handlerclass = confaccessor::gethandler()->getnode(
obj.class_name())) {
496 if (
obj.class_name() == this_class_name.toStdString() or
497 config::api::info::onclass::derived(this_class_name.toStdString(),
obj.class_name())) {
498
500
501 if (handlernode == nullptr) {
502 handlernode = new ObjectNode(obj, false, handlerclass);
503 }
504
505 emit layoutAboutToBeChanged();
506
507
508
510 auto sit = this_structure.begin();
511 auto it = this_objects.begin();
512
513 for (; it != this_objects.end() and sit != this_structure.end() and it->UID() < handlerobj.UID(); ++it, ++sit) {
514 }
515
516 this_structure.insert(++sit, createrow(handlernode));
517
518 this_objects.insert(++it, handlerobj);
519
520
521
522
523 emit layoutChanged();
524 }
525 }
526}
static treenode * findchild(treenode *top, QString const &name)
virtual tref GetObject() const
inner::configobject::tref tref