diff --git a/eeschema/sim/sim_plot_panel.cpp b/eeschema/sim/sim_plot_panel.cpp index 8cbc2f256d..7d4768ae78 100644 --- a/eeschema/sim/sim_plot_panel.cpp +++ b/eeschema/sim/sim_plot_panel.cpp @@ -181,8 +181,8 @@ public: { if( !m_rangeSet ) { - m_minV = 0; - m_maxV = 0; + m_minV = minV; + m_maxV = maxV; m_rangeSet = true; } else @@ -575,8 +575,21 @@ void SIM_PLOT_PANEL::updateAxes( int aNewTraceType ) // suppress warnings break; } + + if( m_axis_x ) + m_axis_x->SetFont( KIUI::GetStatusFont( m_plotWin ) ); + + if( m_axis_y1 ) + m_axis_y1->SetFont( KIUI::GetStatusFont( m_plotWin ) ); + + if( m_axis_y2 ) + m_axis_y2->SetFont( KIUI::GetStatusFont( m_plotWin ) ); + + if( m_axis_y3 ) + m_axis_y3->SetFont( KIUI::GetStatusFont( m_plotWin ) ); } + void SIM_PLOT_PANEL::prepareDCAxes( int aNewTraceType ) { wxString sim_cmd = GetSimCommand().Lower(); diff --git a/include/widgets/mathplot.h b/include/widgets/mathplot.h index 19650b0151..0bae6ef16c 100644 --- a/include/widgets/mathplot.h +++ b/include/widgets/mathplot.h @@ -278,12 +278,12 @@ public: /** Set layer font * @param font Font, will be copied to internal class member */ - void SetFont( wxFont& font ) { m_font = font; } + void SetFont( const wxFont& font ) { m_font = font; } /** Set layer pen * @param pen Pen, will be copied to internal class member */ - void SetPen( wxPen pen ) { m_pen = pen; } + void SetPen( const wxPen& pen ) { m_pen = pen; } /** Set Draw mode: inside or outside margins. Default is outside, which allows the layer to draw up to the mpWindow border. * @param drawModeOutside The draw mode to be set */