From a311bed2fdce3f992e8e0fcc47ec1d62acac705b Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 24 Feb 2022 17:42:40 +0100 Subject: [PATCH] Gui: Fix problem where Python output and errors are not redirected to report view until preferences window is opened --- src/Gui/ReportView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index 54495bc19b..3df0c33e33 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -413,8 +413,11 @@ ReportOutput::ReportOutput(QWidget* parent) Base::Console().AttachObserver(this); getWindowParameter()->Attach(this); - getWindowParameter()->NotifyAll(); + // do this explicitly because the keys below might not yet be part of a group + getWindowParameter()->Notify("RedirectPythonOutput"); + getWindowParameter()->Notify("RedirectPythonErrors"); + _prefs = WindowParameter::getDefaultParameter()->GetGroup("Editor"); _prefs->Attach(this); _prefs->Notify("FontSize");