Fix deprecated and shadowed var compil warnings
This commit is contained in:
parent
42f9be4019
commit
dd395a6854
|
@ -331,7 +331,7 @@ void CURSOR::Plot( wxDC& aDC, mpWindow& aWindow )
|
||||||
wxCoord topPx = m_drawOutsideMargins ? 0 : aWindow.GetMarginTop();
|
wxCoord topPx = m_drawOutsideMargins ? 0 : aWindow.GetMarginTop();
|
||||||
wxCoord bottomPx = m_drawOutsideMargins ? aWindow.GetScrY() : aWindow.GetScrY() - aWindow.GetMarginBottom();
|
wxCoord bottomPx = m_drawOutsideMargins ? aWindow.GetScrY() : aWindow.GetScrY() - aWindow.GetMarginBottom();
|
||||||
|
|
||||||
aDC.SetPen( wxPen( *wxWHITE, 1, m_continuous ? wxSOLID : wxLONG_DASH ) );
|
aDC.SetPen( wxPen( *wxWHITE, 1, m_continuous ? wxPENSTYLE_SOLID : wxPENSTYLE_LONG_DASH ) );
|
||||||
|
|
||||||
if( topPx < cursorPos.y && cursorPos.y < bottomPx )
|
if( topPx < cursorPos.y && cursorPos.y < bottomPx )
|
||||||
aDC.DrawLine( leftPx, cursorPos.y, rightPx, cursorPos.y );
|
aDC.DrawLine( leftPx, cursorPos.y, rightPx, cursorPos.y );
|
||||||
|
@ -461,7 +461,7 @@ bool SIM_PLOT_PANEL::IsPlottable( SIM_TYPE aSimType )
|
||||||
bool SIM_PLOT_PANEL::AddTrace( const wxString& aName, int aPoints,
|
bool SIM_PLOT_PANEL::AddTrace( const wxString& aName, int aPoints,
|
||||||
const double* aX, const double* aY, SIM_PLOT_TYPE aFlags )
|
const double* aX, const double* aY, SIM_PLOT_TYPE aFlags )
|
||||||
{
|
{
|
||||||
TRACE* t = NULL;
|
TRACE* trace = NULL;
|
||||||
|
|
||||||
// Find previous entry, if there is one
|
// Find previous entry, if there is one
|
||||||
auto prev = m_traces.find( aName );
|
auto prev = m_traces.find( aName );
|
||||||
|
@ -473,9 +473,9 @@ bool SIM_PLOT_PANEL::AddTrace( const wxString& aName, int aPoints,
|
||||||
{
|
{
|
||||||
bool hasVoltageTraces = false;
|
bool hasVoltageTraces = false;
|
||||||
|
|
||||||
for( auto t : m_traces )
|
for( auto tr : m_traces )
|
||||||
{
|
{
|
||||||
if( !( t.second->GetFlags() & SPT_CURRENT ) )
|
if( !( tr.second->GetFlags() & SPT_CURRENT ) )
|
||||||
{
|
{
|
||||||
hasVoltageTraces = true;
|
hasVoltageTraces = true;
|
||||||
break;
|
break;
|
||||||
|
@ -489,22 +489,22 @@ bool SIM_PLOT_PANEL::AddTrace( const wxString& aName, int aPoints,
|
||||||
}
|
}
|
||||||
|
|
||||||
// New entry
|
// New entry
|
||||||
t = new TRACE( aName );
|
trace = new TRACE( aName );
|
||||||
t->SetPen( wxPen( generateColor(), 2, wxSOLID ) );
|
trace->SetPen( wxPen( generateColor(), 2, wxPENSTYLE_SOLID ) );
|
||||||
m_traces[aName] = t;
|
m_traces[aName] = trace;
|
||||||
|
|
||||||
// It is a trick to keep legend & coords always on the top
|
// It is a trick to keep legend & coords always on the top
|
||||||
for( mpLayer* l : m_topLevel )
|
for( mpLayer* l : m_topLevel )
|
||||||
DelLayer( l );
|
DelLayer( l );
|
||||||
|
|
||||||
AddLayer( (mpLayer*) t );
|
AddLayer( (mpLayer*) trace );
|
||||||
|
|
||||||
for( mpLayer* l : m_topLevel )
|
for( mpLayer* l : m_topLevel )
|
||||||
AddLayer( l );
|
AddLayer( l );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = prev->second;
|
trace = prev->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double> tmp( aY, aY + aPoints );
|
std::vector<double> tmp( aY, aY + aPoints );
|
||||||
|
@ -523,14 +523,14 @@ bool SIM_PLOT_PANEL::AddTrace( const wxString& aName, int aPoints,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t->SetData( std::vector<double>( aX, aX + aPoints ), tmp );
|
trace->SetData( std::vector<double>( aX, aX + aPoints ), tmp );
|
||||||
|
|
||||||
if( aFlags & SPT_AC_PHASE || aFlags & SPT_CURRENT )
|
if( aFlags & SPT_AC_PHASE || aFlags & SPT_CURRENT )
|
||||||
t->SetScale( m_axis_x, m_axis_y2 );
|
trace->SetScale( m_axis_x, m_axis_y2 );
|
||||||
else
|
else
|
||||||
t->SetScale( m_axis_x, m_axis_y1 );
|
trace->SetScale( m_axis_x, m_axis_y1 );
|
||||||
|
|
||||||
t->SetFlags( aFlags );
|
trace->SetFlags( aFlags );
|
||||||
|
|
||||||
UpdateAll();
|
UpdateAll();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue