summaryrefslogtreecommitdiffstats
path: root/mappingtreewidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-03-18 03:52:00 +0100
committerArno <am@disconnect.de>2012-03-18 03:52:00 +0100
commit6fc9473ea5b84702cc5f07bc405394bddfccf5ac (patch)
treea9154aa8dfaf9d076c24b75da39adec36c185888 /mappingtreewidget.cpp
parent6c97f7d9eef744ce1da03f4d203af2307b08f6eb (diff)
downloadSheMov-6fc9473ea5b84702cc5f07bc405394bddfccf5ac.tar.gz
SheMov-6fc9473ea5b84702cc5f07bc405394bddfccf5ac.tar.bz2
SheMov-6fc9473ea5b84702cc5f07bc405394bddfccf5ac.zip
Save settings for PicturesWidget
Remember selected node in PicturesWidget.
Diffstat (limited to 'mappingtreewidget.cpp')
-rw-r--r--mappingtreewidget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/mappingtreewidget.cpp b/mappingtreewidget.cpp
index 22a9757..27d14d3 100644
--- a/mappingtreewidget.cpp
+++ b/mappingtreewidget.cpp
@@ -182,6 +182,15 @@ void MappingTreeWidget::deleteType(){
}
}
+void MappingTreeWidget::selectPath(const QString &path){
+ QModelIndex pathIdx = mModel->indexFromPath(path);
+ if(!pathIdx.isValid()){
+ return;
+ }
+ QModelIndex real = mProxy->mapFromSource(pathIdx);
+ mTree->setCurrentIndex(real);
+}
+
void MappingTreeWidget::hideEvent(QHideEvent *event){
QString type = mTypeBox->currentText();
if(!type.isEmpty()){