From fe148df57e01822e338b77ed47145f9344ee6c38 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand <seth@kipro-pcb.com> Date: Thu, 16 Dec 2021 16:04:42 -0800 Subject: [PATCH] Catch language switch before Python We don't translate the python scripting window yet, so we need to catch the KIWAY message to change the language and simply discard it Fixes https://gitlab.com/kicad/code/kicad/issues/10021 --- scripting/kipython_frame.cpp | 1 + scripting/kipython_frame.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/scripting/kipython_frame.cpp b/scripting/kipython_frame.cpp index 3507570c58..379c4bfcb2 100644 --- a/scripting/kipython_frame.cpp +++ b/scripting/kipython_frame.cpp @@ -84,6 +84,7 @@ output.SetParent( parent ) )", pybind11::globals(), locals ); } + KIPYTHON_FRAME::KIPYTHON_FRAME( KIWAY* aKiway, wxWindow* aParent ) : KIWAY_PLAYER( aKiway, aParent, FRAME_PYTHON, wxT( "KiPython" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, wxT( "KiPython" ) ) diff --git a/scripting/kipython_frame.h b/scripting/kipython_frame.h index dde88be486..50b58d95f0 100644 --- a/scripting/kipython_frame.h +++ b/scripting/kipython_frame.h @@ -48,6 +48,8 @@ public: void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override {} void ProjectChanged() override {} + void ShowChangedLanguage() override {}; + void SetupPythonEditor(); private: