Eradicate g_userUnit from router.
(cherry picked from commit 5e90e6b)
This commit is contained in:
parent
ae2cb331b1
commit
ff34c7a948
|
@ -358,7 +358,7 @@ int DP_MEANDER_PLACER::CurrentLayer() const
|
|||
}
|
||||
|
||||
|
||||
const wxString DP_MEANDER_PLACER::TuningInfo() const
|
||||
const wxString DP_MEANDER_PLACER::TuningInfo( EDA_UNITS_T aUnits ) const
|
||||
{
|
||||
wxString status;
|
||||
|
||||
|
@ -377,11 +377,11 @@ const wxString DP_MEANDER_PLACER::TuningInfo() const
|
|||
return _( "?" );
|
||||
}
|
||||
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_lastLength, false );
|
||||
status += ::MessageTextFromValue( aUnits, m_lastLength, false );
|
||||
status += "/";
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_settings.m_targetLength, false );
|
||||
status += ::MessageTextFromValue( aUnits, m_settings.m_targetLength, false );
|
||||
status += " (gap: ";
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_originPair.Gap(), false );
|
||||
status += ::MessageTextFromValue( aUnits, m_originPair.Gap(), false );
|
||||
status += ")";
|
||||
|
||||
return status;
|
||||
|
|
|
@ -100,7 +100,7 @@ public:
|
|||
|
||||
int totalLength();
|
||||
|
||||
const wxString TuningInfo() const override;
|
||||
const wxString TuningInfo( EDA_UNITS_T aUnits ) const override;
|
||||
TUNING_STATUS TuningStatus() const override;
|
||||
|
||||
bool CheckFit( MEANDER_SHAPE* aShape ) override;
|
||||
|
|
|
@ -799,7 +799,7 @@ bool PNS_KICAD_IFACE::syncZone( PNS::NODE* aWorld, ZONE_CONTAINER* aZone )
|
|||
dlg.ShowDetailedText(
|
||||
wxString::Format( _( "%s\nThis zone cannot be handled by the track layout tool.\n"
|
||||
"Please verify it is not a self-intersecting polygon." ),
|
||||
aZone->GetSelectMenuText( g_UserUnit ) ) );
|
||||
aZone->GetSelectMenuText( MILLIMETRES ) ) );
|
||||
dlg.DoNotShowCheckbox();
|
||||
dlg.ShowModal();
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ int MEANDER_PLACER::CurrentLayer() const
|
|||
}
|
||||
|
||||
|
||||
const wxString MEANDER_PLACER::TuningInfo() const
|
||||
const wxString MEANDER_PLACER::TuningInfo( EDA_UNITS_T aUnits ) const
|
||||
{
|
||||
wxString status;
|
||||
|
||||
|
@ -252,9 +252,9 @@ const wxString MEANDER_PLACER::TuningInfo() const
|
|||
return _( "?" );
|
||||
}
|
||||
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_lastLength, false );
|
||||
status += ::MessageTextFromValue( aUnits, m_lastLength, false );
|
||||
status += "/";
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_settings.m_targetLength, false );
|
||||
status += ::MessageTextFromValue( aUnits, m_settings.m_targetLength, false );
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
int CurrentLayer() const override;
|
||||
|
||||
/// @copydoc MEANDER_PLACER_BASE::TuningInfo()
|
||||
virtual const wxString TuningInfo() const override;
|
||||
virtual const wxString TuningInfo( EDA_UNITS_T aUnits ) const override;
|
||||
|
||||
/// @copydoc MEANDER_PLACER_BASE::TuningStatus()
|
||||
virtual TUNING_STATUS TuningStatus() const override;
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
* Returns a string describing the status and length of the
|
||||
* tuned traces.
|
||||
*/
|
||||
virtual const wxString TuningInfo() const = 0;
|
||||
virtual const wxString TuningInfo( EDA_UNITS_T aUnits ) const = 0;
|
||||
|
||||
/**
|
||||
* Function TuningStatus()
|
||||
|
|
|
@ -144,7 +144,7 @@ bool MEANDER_SKEW_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
|
|||
}
|
||||
|
||||
|
||||
const wxString MEANDER_SKEW_PLACER::TuningInfo() const
|
||||
const wxString MEANDER_SKEW_PLACER::TuningInfo( EDA_UNITS_T aUnits ) const
|
||||
{
|
||||
wxString status;
|
||||
|
||||
|
@ -163,9 +163,9 @@ const wxString MEANDER_SKEW_PLACER::TuningInfo() const
|
|||
return _( "?" );
|
||||
}
|
||||
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_lastLength - m_coupledLength, false );
|
||||
status += ::MessageTextFromValue( aUnits, m_lastLength - m_coupledLength, false );
|
||||
status += "/";
|
||||
status += ::MessageTextFromValue( g_UserUnit, m_settings.m_targetSkew, false );
|
||||
status += ::MessageTextFromValue( aUnits, m_settings.m_targetSkew, false );
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
bool Move( const VECTOR2I& aP, ITEM* aEndItem ) override;
|
||||
|
||||
/// @copydoc MEANDER_PLACER_BASE::TuningInfo()
|
||||
const wxString TuningInfo() const override;
|
||||
const wxString TuningInfo( EDA_UNITS_T aUnits ) const override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "draw_frame.h"
|
||||
#include "pns_tune_status_popup.h"
|
||||
#include "pns_router.h"
|
||||
#include "pns_meander_placer.h"
|
||||
|
@ -37,7 +38,7 @@ void PNS_TUNE_STATUS_POPUP::UpdateStatus( PNS::ROUTER* aRouter )
|
|||
if( !placer )
|
||||
return;
|
||||
|
||||
SetText( placer->TuningInfo() );
|
||||
SetText( placer->TuningInfo( m_frame->GetUserUnits() ) );
|
||||
|
||||
switch( placer->TuningStatus() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue