summaryrefslogtreecommitdiffstats
path: root/archivecontroller.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-10-12 15:35:24 +0200
committerArno <am@disconnect.de>2013-10-12 15:35:24 +0200
commit89662ce745c1eee152e7bc2200be5f08caee78a8 (patch)
tree8d1e1de7d33c9a2ba78ba4cecb5683cf8db0f587 /archivecontroller.cpp
parentf4d47b31976bf0b95c8ee3e4c1f010ffe1d2fd21 (diff)
downloadSheMov-89662ce745c1eee152e7bc2200be5f08caee78a8.tar.gz
SheMov-89662ce745c1eee152e7bc2200be5f08caee78a8.tar.bz2
SheMov-89662ce745c1eee152e7bc2200be5f08caee78a8.zip
Improve PictureViewer2
* implement Mark Files * always show all pictures from context * change navigation: N -> next P -> previous M -> mark/unmark file
Diffstat (limited to 'archivecontroller.cpp')
-rw-r--r--archivecontroller.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/archivecontroller.cpp b/archivecontroller.cpp
index 84e714c..574b9c1 100644
--- a/archivecontroller.cpp
+++ b/archivecontroller.cpp
@@ -311,7 +311,19 @@ void ArchiveController::fileDoubleClicked(const QModelIndex &idx){
return;
}
PictureViewer2 *pv = SmGlobals::instance()->pictureViewer();
- pv->setFile(idx.data(ArchiveFilesModel::FullPathRole).toString());
+ QModelIndex parent = idx.parent();
+ QStringList paths;
+ if(parent.isValid()){
+ int row = 0;
+ QModelIndex child = parent.child(row, ArchiveFilesModel::FullPath);
+ while(child.isValid()){
+ paths << child.data().toString();
+ ++row;
+ child = parent.child(row, ArchiveFilesModel::FullPath);
+ }
+ }
+ pv->setShowMarkItem(false);
+ pv->addFiles(paths);
pv->show();
}