From 6fc9473ea5b84702cc5f07bc405394bddfccf5ac Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 18 Mar 2012 03:52:00 +0100 Subject: Save settings for PicturesWidget Remember selected node in PicturesWidget. --- mappingtreewidget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mappingtreewidget.cpp') 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()){ -- cgit v1.2.3-70-g09d2