From 02c5a31b99f40bb298429ae25ac89dd3e3b8ed24 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 16 Apr 2023 23:44:43 +0100 Subject: [PATCH] Fix close button on simulator frame. Fixes https://gitlab.com/kicad/code/kicad/issues/14551 --- eeschema/sim/simulator_frame.cpp | 6 ++++++ eeschema/sim/simulator_frame.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/eeschema/sim/simulator_frame.cpp b/eeschema/sim/simulator_frame.cpp index f2c5e6731c..8a928280ff 100644 --- a/eeschema/sim/simulator_frame.cpp +++ b/eeschema/sim/simulator_frame.cpp @@ -457,6 +457,12 @@ private: }; +BEGIN_EVENT_TABLE( SIMULATOR_FRAME, SIMULATOR_FRAME_BASE ) + EVT_MENU( wxID_EXIT, SIMULATOR_FRAME::onExit ) + EVT_MENU( wxID_CLOSE, SIMULATOR_FRAME::onExit ) +END_EVENT_TABLE() + + SIMULATOR_FRAME::SIMULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SIMULATOR_FRAME_BASE( aParent ), m_SuppressGridEvents( 0 ), diff --git a/eeschema/sim/simulator_frame.h b/eeschema/sim/simulator_frame.h index 5e45bab7df..c701f4132e 100644 --- a/eeschema/sim/simulator_frame.h +++ b/eeschema/sim/simulator_frame.h @@ -245,6 +245,8 @@ public: void OnModify() override; + DECLARE_EVENT_TABLE() + private: void setupTools(); void doReCreateMenuBar() override;