From 460b08c6cad4d1f4c8c78d8857902166cb1ae385 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Sun, 16 Apr 2023 20:09:57 -0400 Subject: [PATCH] Nix a dialog in kicad_cli.cpp that shouldn't ever fire --- kicad/kicad_cli.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/kicad/kicad_cli.cpp b/kicad/kicad_cli.cpp index 7f09eac054..11b04b81b5 100644 --- a/kicad/kicad_cli.cpp +++ b/kicad/kicad_cli.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include //for wxPrintf #include @@ -514,32 +513,6 @@ struct APP_KICAD_CLI : public wxAppConsole int FilterEvent( wxEvent& aEvent ) override { - if( aEvent.GetEventType() == wxEVT_SHOW ) - { - wxShowEvent& event = static_cast( aEvent ); - wxDialog* dialog = dynamic_cast( event.GetEventObject() ); - - std::vector& dlgs = Pgm().m_ModalDialogs; - - if( dialog ) - { - if( event.IsShown() && dialog->IsModal() ) - { - dlgs.push_back( dialog ); - } - // Under GTK, sometimes the modal flag is cleared before hiding - else if( !event.IsShown() && !dlgs.empty() ) - { - // If we close the expected dialog, remove it from our stack - if( dlgs.back() == dialog ) - dlgs.pop_back(); - // If an out-of-order, remove all dialogs added after the closed one - else if( auto it = std::find( dlgs.begin(), dlgs.end(), dialog ) ; it != dlgs.end() ) - dlgs.erase( it, dlgs.end() ); - } - } - } - return Event_Skip; }