If magnitude or phase is specified, don't add both.
Fixes https://gitlab.com/kicad/code/kicad/issues/13202
This commit is contained in:
parent
508b9e21a8
commit
e11d39b0f2
|
@ -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 );
|
int baseType = aType & ~( SPT_AC_MAG | SPT_AC_PHASE );
|
||||||
|
|
||||||
// Add two plots: magnitude & phase
|
// If magnitude or phase wasn't specified, then add both
|
||||||
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( baseType | SPT_AC_MAG ), plotPanel );
|
if( baseType == aType )
|
||||||
updated |= updatePlot( aName, ( SIM_PLOT_TYPE )( baseType | SPT_AC_PHASE ), plotPanel );
|
{
|
||||||
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue