Sim plot: fix a rounding issue that can create a missing point in a plot.
Due to a truncation when converting a value to integer, the first point was sometimes missing because it looked like out of plot range. Fix also a cosmetic issue in dialog. Fixes #7345 https://gitlab.com/kicad/code/kicad/issues/7345
This commit is contained in:
parent
8eca23aabe
commit
c155218582
|
@ -708,7 +708,9 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
|||
wxCoord y1 = w.y2p( py );
|
||||
|
||||
// Store only points on the drawing area, to speed up the drawing time
|
||||
if( x1 >= startPx && x1 <= endPx )
|
||||
// Note: x1 is a value truncated from px by w.x2p(). So to be sure the
|
||||
// first point is drawn, the x1 low limit is startPx-1 in plot coordinates
|
||||
if( x1 >= startPx-1 && x1 <= endPx )
|
||||
{
|
||||
if( !count || line_start.x != x1 )
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Sep 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -95,9 +95,6 @@ DIALOG_SIM_SETTINGS_BASE::DIALOG_SIM_SETTINGS_BASE( wxWindow* parent, wxWindowID
|
|||
wxBoxSizer* bSizer151;
|
||||
bSizer151 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizer151->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
wxGridBagSizer* gbSizer1;
|
||||
gbSizer1 = new wxGridBagSizer( 0, 0 );
|
||||
gbSizer1->SetFlexibleDirection( wxBOTH );
|
||||
|
@ -193,9 +190,6 @@ DIALOG_SIM_SETTINGS_BASE::DIALOG_SIM_SETTINGS_BASE( wxWindow* parent, wxWindowID
|
|||
bSizer151->Add( gbSizer1, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer151->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer82->Add( bSizer151, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<property name="file">dialog_sim_settings_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">DIALOG_SIM_SETTINGS_BASE</property>
|
||||
|
@ -26,7 +25,6 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -876,21 +874,11 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer151</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
|
@ -2306,7 +2294,6 @@
|
|||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
|
@ -2369,16 +2356,6 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
@ -4743,7 +4720,6 @@
|
|||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Sep 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -189,8 +189,8 @@ SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent )
|
|||
KiBitmap( sim_probe_xpm ), _( "Probe signals on the schematic" ), wxITEM_NORMAL );
|
||||
m_toolTune = m_toolBar->AddTool( ID_SIM_TUNE, _( "Tune" ),
|
||||
KiBitmap( sim_tune_xpm ), _( "Tune component values" ), wxITEM_NORMAL );
|
||||
m_toolSettings = m_toolBar->AddTool( wxID_ANY, _( "Settings" ),
|
||||
KiBitmap( sim_settings_xpm ), _( "Simulation settings" ), wxITEM_NORMAL );
|
||||
m_toolSettings = m_toolBar->AddTool( wxID_ANY, _( "Sim Parameters" ),
|
||||
KiBitmap( sim_settings_xpm ), _( "Simulation parameters and settings" ), wxITEM_NORMAL );
|
||||
|
||||
Connect( m_toolSimulate->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
|
||||
wxCommandEventHandler( SIM_PLOT_FRAME::onSimulate ), NULL, this );
|
||||
|
|
Loading…
Reference in New Issue