diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index 99a44066b5..20a219a41b 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -95,11 +95,11 @@ PropertyView::PropertyView(QWidget *parent) pLayout->addWidget(tabs, 0, 0); propertyEditorView = new Gui::PropertyEditor::PropertyEditor(); - propertyEditorView->setAutomaticDocumentUpdate(false); + propertyEditorView->setAutomaticDocumentUpdate(_GetParam()->GetBool("AutoTransactionView", false)); tabs->addTab(propertyEditorView, tr("View")); propertyEditorData = new Gui::PropertyEditor::PropertyEditor(); - propertyEditorData->setAutomaticDocumentUpdate(true); + propertyEditorData->setAutomaticDocumentUpdate(_GetParam()->GetBool("AutoTransactionData", true)); tabs->addTab(propertyEditorData, tr("Data")); int preferredTab = _GetParam()->GetInt("LastTabIndex", 1); diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 817372d2e5..4f6f95e96b 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -38,6 +38,7 @@ #include #include #include +#include "ViewProviderDocumentObject.h" #include "MainWindow.h" #include "DlgAddProperty.h" #include "PropertyEditor.h" @@ -202,6 +203,11 @@ void PropertyEditor::setupTransaction(const QModelIndex &index) { auto prop = items[0]; auto parent = prop->getContainer(); auto obj = Base::freecad_dynamic_cast(parent); + if (!obj) { + auto view = Base::freecad_dynamic_cast(parent); + if (view) + obj = view->getObject(); + } if(!obj || !obj->getDocument()) { FC_LOG("invalid object"); return;