Grids: remove more uses of old user grid in UI
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15515
This commit is contained in:
parent
a4d1b29b91
commit
3edcef0229
|
@ -69,13 +69,6 @@ void COMMON_TOOLS::Reset( RESET_REASON aReason )
|
|||
m_grids.emplace_back( KiROUND<double, int>( gridSize ), KiROUND<double, int>( gridSize ) );
|
||||
}
|
||||
|
||||
double userGridX = EDA_UNIT_UTILS::UI::DoubleValueFromString( scale, EDA_UNITS::MILLIMETRES,
|
||||
settings.user_grid_x );
|
||||
double userGridY = EDA_UNIT_UTILS::UI::DoubleValueFromString( scale, EDA_UNITS::MILLIMETRES,
|
||||
settings.user_grid_y );
|
||||
|
||||
m_grids.emplace_back( KiROUND<double, int>( userGridX ), KiROUND<double, int>( userGridY ) );
|
||||
|
||||
OnGridChanged( false );
|
||||
}
|
||||
|
||||
|
|
|
@ -403,19 +403,9 @@ void DIALOG_BOARD_REANNOTATE::GetParameters()
|
|||
// Get the chosen sort grid for rounding
|
||||
m_gridIndex = m_GridChoice->GetSelection();
|
||||
|
||||
if( m_gridIndex >= ( int ) m_settings->m_Window.grid.sizes.size() )
|
||||
{
|
||||
m_sortGridx = EDA_UNIT_UTILS::UI::DoubleValueFromString(
|
||||
pcbIUScale, EDA_UNITS::MILS, m_settings->m_Window.grid.user_grid_x );
|
||||
m_sortGridy = EDA_UNIT_UTILS::UI::DoubleValueFromString(
|
||||
pcbIUScale, EDA_UNITS::MILS, m_settings->m_Window.grid.user_grid_y );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sortGridx = EDA_UNIT_UTILS::UI::DoubleValueFromString(
|
||||
pcbIUScale, EDA_UNITS::MILS, m_settings->m_Window.grid.sizes[m_gridIndex] );
|
||||
m_sortGridy = m_sortGridx;
|
||||
}
|
||||
m_sortGridx = EDA_UNIT_UTILS::UI::DoubleValueFromString(
|
||||
pcbIUScale, EDA_UNITS::MILS, m_settings->m_Window.grid.sizes[m_gridIndex] );
|
||||
m_sortGridy = m_sortGridx;
|
||||
|
||||
m_annotationScope = ANNOTATE_ALL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue