Browse Source

If magnitude or phase is specified, don't add both.

Fixes https://gitlab.com/kicad/code/kicad/issues/13202
7.0
Jeff Young 3 years ago
parent
commit
e11d39b0f2
  1. 13
      eeschema/sim/sim_plot_frame.cpp

13
eeschema/sim/sim_plot_frame.cpp

@ -688,9 +688,16 @@ void SIM_PLOT_FRAME::addPlot( const wxString& aName, SIM_PLOT_TYPE aType )
{
int baseType = aType & ~( SPT_AC_MAG | SPT_AC_PHASE );
// Add two plots: magnitude & phase
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( baseType | SPT_AC_MAG ), plotPanel );
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( baseType | SPT_AC_PHASE ), plotPanel );
// If magnitude or phase wasn't specified, then add both
if( baseType == aType )
{
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( baseType | SPT_AC_MAG ), plotPanel );
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( baseType | SPT_AC_PHASE ), plotPanel );
}
else
{
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( aType ), plotPanel );
}
}
else
{

Loading…
Cancel
Save