Advertisement
hnOsmium0001

Untitled

Jul 28th, 2020
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. size_t properties_cnt = properties->get_child_count() - 1;
  2. size_t count = std::max(properties_cnt, info.size());
  3. for (int i = 1; i < count + 1; ++i) {
  4. if (i >= properties->get_child_count()) {
  5. add_root_property();
  6. }
  7. if (auto prop = Object::cast_to<ResourceSchemaNode>(properties->get_child(i))) {
  8. // if (auto iter = info.find(prop->get_field_name()); iter != info.end()) {
  9. // prop->update_with(iter->second);
  10. // }
  11. } else {
  12. ERR_PRINT("Properties box contains unexpected nodes that aren't of type ResourceSchemaNode");
  13. }
  14. }
  15. // Free the extra UI properties that we don't need.
  16. for (int i = 1 + info.size(); i < properties->get_child_count(); ++i) {
  17. properties->get_child(i)->free();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement