TreePath PropertyTreeModel::pathFromRow(PropertyRow* row) { TreePath result; if(row) while(row->parent()){ int childIndex = row->parent()->childIndex(row); YASLI_ESCAPE(childIndex >= 0, return TreePath()); result.insert(result.begin(), childIndex); row = row->parent(); } return result; }