diff options
Diffstat (limited to 'mappingtreewidget.cpp')
-rw-r--r-- | mappingtreewidget.cpp | 9 |
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()){ |