diff options
author | Arno <arno@disconnect.de> | 2018-07-20 14:57:51 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-07-20 14:57:51 +0200 |
commit | 884bd1db91e9985e0676ae75c083f917708d1312 (patch) | |
tree | 89051e123dc1b78a6d4beffdc02d01b3af4f67d7 | |
parent | 6baa7366f20eabac32c3d84ae9832e517f5e0400 (diff) | |
download | SheMov-884bd1db91e9985e0676ae75c083f917708d1312.tar.gz SheMov-884bd1db91e9985e0676ae75c083f917708d1312.tar.bz2 SheMov-884bd1db91e9985e0676ae75c083f917708d1312.zip |
Save/Restore PicturesWidget selection
Finally!
-rw-r--r-- | pictureswidget.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pictureswidget.cpp b/pictureswidget.cpp index 4b1f9db..69540f3 100644 --- a/pictureswidget.cpp +++ b/pictureswidget.cpp @@ -19,6 +19,8 @@ #include "pictureswidget.h" #include "picturelistview.h" #include "mappingtreewidget.h" +#include "mappingtreeview.h" +#include "mappingtreeproxy.h" #include "mappingeditwidget.h" #include "mappingeditdialog.h" #include "mappingtreeresultmodel.h" @@ -151,7 +153,9 @@ void PicturesWidget::readSettings(){ for(int i = 0; i < ps.count(); ++i){ path << ps.at(i).toInt(); } - + QModelIndex sel = mMappingTree->mappingTreeModel()->indexFromParentPath(path, true); + QModelIndex selProxy = mMappingTree->mappingTreeProxy()->mapFromSource(sel); + mMappingTree->mappingTreeView()->selectionModel()->select(selProxy, QItemSelectionModel::Rows | QItemSelectionModel::ClearAndSelect); } void PicturesWidget::editMappings(){ |