From b71d36c02bcb5c93bfaf97ccab4b1e99a44b782b Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 22 Sep 2012 08:10:44 +0200 Subject: MappingTreeModel Fix: Select pictures from pics_mappings2 Select pictures referencing pics_mappings2 instead of broken pics_mappings. This just fixes the selection, nothing else! --- mappingtreemodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mappingtreemodel.cpp') diff --git a/mappingtreemodel.cpp b/mappingtreemodel.cpp index d63ef63..9bb278d 100644 --- a/mappingtreemodel.cpp +++ b/mappingtreemodel.cpp @@ -136,6 +136,9 @@ QVariant MappingTreeModel::data(const QModelIndex &index, int role) const{ if(role == AddedRole){ return item->data(Added); } + if(role == MapParentIdRole){ + return item->data(MapParentId); + } if(role == Qt::ForegroundRole){ if(mSelectedMappings.contains(item)){ return QColor(Qt::blue); @@ -218,6 +221,9 @@ bool MappingTreeModel::setData(const QModelIndex &index, const QVariant &value, if(role == AddedRole){ item->setData(Added, value); } + if(role == MapParentIdRole){ + item->setData(MapParentId, value); + } return true; } -- cgit v1.2.3-70-g09d2