diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 239d2399c..92180f7ca 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -136,9 +136,11 @@ void PropertyEditor::buildUp(const std::mapcurrentIndex(); QStringList propertyPath = propertyModel->propertyPathFromIndex(index); + if (!propertyPath.isEmpty()) + this->selectedProperty = propertyPath; propertyModel->buildUp(props); - if (!propertyPath.isEmpty()) { - QModelIndex index = propertyModel->propertyIndexFromPath(propertyPath); + if (!this->selectedProperty.isEmpty()) { + QModelIndex index = propertyModel->propertyIndexFromPath(this->selectedProperty); this->setCurrentIndex(index); } } diff --git a/src/Gui/propertyeditor/PropertyEditor.h b/src/Gui/propertyeditor/PropertyEditor.h index 6e59d9631..aa9c89587 100644 --- a/src/Gui/propertyeditor/PropertyEditor.h +++ b/src/Gui/propertyeditor/PropertyEditor.h @@ -63,6 +63,7 @@ protected: private: PropertyModel* propertyModel; + QStringList selectedProperty; bool autoupdate; bool committing; bool delaybuild;