summaryrefslogtreecommitdiffstats
path: root/smglobals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'smglobals.cpp')
-rw-r--r--smglobals.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/smglobals.cpp b/smglobals.cpp
index 5f50ede..e5c67f4 100644
--- a/smglobals.cpp
+++ b/smglobals.cpp
@@ -93,13 +93,17 @@ QAbstractItemModel *SmGlobals::model(const QString &which){
mModels.insert(which, model);
}
}else if(which == "ArchiveModel"){
- QStringList headers = QStringList() << tr("Series") << tr("Series ID") << tr("Series part ID") << tr("Part") << tr("Type") << tr("Favorite") << tr("Subtitle") << tr("Count");
- ArchiveModel *model = new ArchiveModel(headers);
- mModels.insert(which, model);
+ if(!mModels.contains("ArchiveModel")){
+ QStringList headers = QStringList() << tr("Series") << tr("Series ID") << tr("Series part ID") << tr("Part") << tr("Type") << tr("Favorite") << tr("Subtitle") << tr("Count");
+ ArchiveModel *model = new ArchiveModel(headers);
+ mModels.insert(which, model);
+ }
}else if(which == "BrowserModel"){
- QStringList headers = QStringList() << tr("Name") << tr("Generic Id") << tr("Node Type") << tr("Size") << tr("Quality") << tr("File Type") << tr("Full Path") << tr("Selected");
- ArchiveBrowserModel *model = new ArchiveBrowserModel(headers);
- mModels.insert(which, model);
+ if(!mModels.contains("BrowserModel")){
+ QStringList headers = QStringList() << QChar(0x26A7) << tr("Name") << tr("Generic Id") << tr("Node Type") << tr("Size") << tr("Quality") << tr("File Type") << tr("Full Path") << tr("Selected");
+ ArchiveBrowserModel *model = new ArchiveBrowserModel(headers);
+ mModels.insert(which, model);
+ }
}
return mModels.contains(which) ? mModels.value(which) : 0;
}