summaryrefslogtreecommitdiffstats
path: root/mappingtreewidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-10-06 11:02:42 +0200
committerArno <am@disconnect.de>2012-10-06 11:02:42 +0200
commite2d4843586d84da62e325d1cb0025a795b162c1c (patch)
tree9dd94bf487c4f1d55845854706387512d7279ea2 /mappingtreewidget.cpp
parentc7caac3459461f93fbae544a501fa491f84e5ce4 (diff)
downloadSheMov-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.cpp2
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(){