From f2b80db9c4dd18e59f8b606e113d9f15cd891c5d Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 22 Sep 2012 07:11:55 +0200 Subject: MappingTreeModel Fix: repair parent <-> child relationship Warning: this commit seems to work, but it doesn't! Introduce two new tables: mappings_parents2 and pics_mappings2 to create a real parent-child relationship. The pics_mappings need to reference a unique mappings_parents_id so the same mapping can be a child of different parents. For now only the MappingTree references the new tables. Everything else uses the old ones. Hence the warning! --- smglobals.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smglobals.cpp') diff --git a/smglobals.cpp b/smglobals.cpp index b73c89b..93ec72e 100644 --- a/smglobals.cpp +++ b/smglobals.cpp @@ -94,7 +94,7 @@ QAbstractItemModel *SmGlobals::model(const QString &which){ } }else if(which == "MappingTree"){ if(!mModels.contains("MappingTree")){ - QStringList headers = QStringList() << tr("Name") << tr("Id") << tr("Date"); + QStringList headers = QStringList() << tr("Name") << tr("Id") << tr("Date") << tr("Parent"); MappingTreeModel *model = new MappingTreeModel(headers); mModels.insert(which, model); } -- cgit v1.2.3-70-g09d2