diff options
author | Arno <am@disconnect.de> | 2012-10-06 11:02:42 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2012-10-06 11:02:42 +0200 |
commit | e2d4843586d84da62e325d1cb0025a795b162c1c (patch) | |
tree | 9dd94bf487c4f1d55845854706387512d7279ea2 /mappingtreewidget.cpp | |
parent | c7caac3459461f93fbae544a501fa491f84e5ce4 (diff) | |
download | SheMov-e2d4843586d84da62e325d1cb0025a795b162c1c.tar.gz SheMov-e2d4843586d84da62e325d1cb0025a795b162c1c.tar.bz2 SheMov-e2d4843586d84da62e325d1cb0025a795b162c1c.zip |
More fixes to MappingTreeModel
Fix move, addChild and such. Rename Fields and Roles to more speaking
names, but that revealed a much deeper bug: the ParentID isn't really
the parent_id, but the mapping_id. That could explain a lot.
Nevertheless, it's still faster to repopulate the model after moving
oder adding children instead of calling removeRows and insertRows.
Another non-working commit... :(
Diffstat (limited to 'mappingtreewidget.cpp')
-rw-r--r-- | mappingtreewidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mappingtreewidget.cpp b/mappingtreewidget.cpp index 1897cf1..0951312 100644 --- a/mappingtreewidget.cpp +++ b/mappingtreewidget.cpp @@ -221,7 +221,7 @@ void MappingTreeWidget::editChild(){ void MappingTreeWidget::selectionChanged(){ QModelIndex sel = selected(); QModelIndex real = mProxy->mapToSource(sel); - emit mappingChanged(real.data(MappingTreeModel::MapParentIdRole).toInt()); + emit mappingChanged(real.data(MappingTreeModel::MyIdRole).toInt()); } void MappingTreeWidget::moveChild(){ |