From 4d7ddf619a4e0feab49aafeb9896e5e5dfee8aa5 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 20 Jan 2023 13:26:11 -0800 Subject: [PATCH] Remove unused var and cleanup --- eeschema/sim/sim_plot_frame.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index 7f70992408..a97722fc4c 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -2041,8 +2041,6 @@ SIM_PLOT_FRAME::CURSOR_CONTEXT_MENU::CURSOR_CONTEXT_MENU( const wxString& aSigna m_signal( aSignal ), m_plotFrame( aPlotFrame ) { - SIM_PLOT_PANEL* plot = m_plotFrame->GetCurrentPlot(); - AddMenuItem( this, HIDE_CURSOR, _( "Hide Cursor" ), KiBitmap( BITMAPS::pcb_target ) ); Connect( wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( CURSOR_CONTEXT_MENU::onMenuEvent ), @@ -2054,10 +2052,8 @@ void SIM_PLOT_FRAME::CURSOR_CONTEXT_MENU::onMenuEvent( wxMenuEvent& aEvent ) { SIM_PLOT_PANEL* plot = m_plotFrame->GetCurrentPlot(); - switch( aEvent.GetId() ) - { - case HIDE_CURSOR: plot->EnableCursor( m_signal, false ); break; - } + if( aEvent.GetId() == HIDE_CURSOR ) + plot->EnableCursor( m_signal, false ); }