From 161973b962ff0b8b2dd4f35e6ed7963657678c0d Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 14 Sep 2018 16:30:26 +0200 Subject: [PATCH] add option to disable auto-deactivation of property view for inactive document --- src/Gui/PropertyView.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index db497f8bfa..fed192f12d 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -173,7 +173,13 @@ void PropertyView::slotChangePropertyEditor(const App::Property& prop) void PropertyView::slotActiveDocument(const Gui::Document &doc) { - bool enableEditor = false; + // allow to disable the auto-deactivation + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + bool enableEditor = hGrp->GetBool("EnablePropertyViewForInactiveDocument", false); + if (enableEditor) { + setEnabled(true); + return; + } // check if at least one selected object is part of the active document std::vector array = Gui::Selection().getCompleteSelection(); @@ -211,7 +217,9 @@ void PropertyView::onSelectionChanged(const SelectionChanges& msg) msg.Type != SelectionChanges::ClrSelection) return; - bool enableEditor = false; + // allow to disable the auto-deactivation + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + bool enableEditor = hGrp->GetBool("EnablePropertyViewForInactiveDocument", false); Gui::Document *activeDoc = Application::Instance->activeDocument(); // group the properties by