Push UNITS_PROVIDER down into a low-level mixin.

This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
This commit is contained in:
Jeff Young
2022-09-19 17:10:59 +01:00
parent 5990595619
commit 64a6fc0fd4
128 changed files with 533 additions and 510 deletions
+2 -4
View File
@@ -190,7 +190,7 @@ wxString STROKE_PARAMS::GetLineStyleToken( PLOT_DASH_TYPE aStyle )
}
void STROKE_PARAMS::GetMsgPanelInfo( const EDA_IU_SCALE& aIuScale, EDA_UNITS aUnits,
void STROKE_PARAMS::GetMsgPanelInfo( UNITS_PROVIDER* aUnitsProvider,
std::vector<MSG_PANEL_ITEM>& aList,
bool aIncludeStyle, bool aIncludeWidth )
{
@@ -211,9 +211,7 @@ void STROKE_PARAMS::GetMsgPanelInfo( const EDA_IU_SCALE& aIuScale, EDA_UNITS aUn
}
if( aIncludeWidth )
{
aList.emplace_back( _( "Line Width" ), EDA_UNIT_UTILS::UI::MessageTextFromValue( aIuScale, aUnits, GetWidth() ) );
}
aList.emplace_back( _( "Line Width" ), aUnitsProvider->MessageTextFromValue( GetWidth() ) );
}