diff options
author | Arno <am@disconnect.de> | 2012-10-04 06:59:44 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2012-10-04 07:01:29 +0200 |
commit | 184448e767ccdeae66fe4d795757cace98033b0e (patch) | |
tree | 26cafbb4fbafe94406413439c0cbd36f5cd66cc3 /smglobals.cpp | |
parent | deeec5306a37e2280626f3486a07629570aafe92 (diff) | |
download | SheMov-184448e767ccdeae66fe4d795757cace98033b0e.tar.gz SheMov-184448e767ccdeae66fe4d795757cace98033b0e.tar.bz2 SheMov-184448e767ccdeae66fe4d795757cace98033b0e.zip |
Fix Mappings in PictureViewer2
Another fix for the new MappingTreeModel database layout: Make the
mappings display correctly when showing an archived picture.
For performance reasons I had to make PicFilesModel global and put it
into a separate file.
Also clean up MappingTreeModel: remove comments and unused functions.
Diffstat (limited to 'smglobals.cpp')
-rw-r--r-- | smglobals.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/smglobals.cpp b/smglobals.cpp index 93ec72e..c435a2c 100644 --- a/smglobals.cpp +++ b/smglobals.cpp @@ -28,6 +28,7 @@ #include "seriesmetadatamodel.h" #include "mappingtreemodel.h" #include "pictureviewer2.h" +#include "picfilesmodel.h" #include "configurationdialog.h" SmGlobals *SmGlobals::mInstance = 0; @@ -98,6 +99,12 @@ QAbstractItemModel *SmGlobals::model(const QString &which){ MappingTreeModel *model = new MappingTreeModel(headers); mModels.insert(which, model); } + }else if(which == "PicFiles"){ + if(!mModels.contains("PicFiles")){ + QStringList headers = QStringList() << tr("Filename") << tr("SizeNum") << tr("Format") << tr("Full Path") << tr("Id") << tr("Added") << tr("Md5Sum") << tr("Size"); + PicFilesModel *model = new PicFilesModel(headers); + mModels.insert(which, model); + } } return mModels.contains(which) ? mModels.value(which) : 0; } |