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