Fix calculation of selection center
Fixes https://gitlab.com/kicad/code/kicad/issues/9998
This commit is contained in:
parent
1610195a09
commit
2ecd5ac909
|
@ -95,7 +95,7 @@ VECTOR2I SELECTION::GetCenter() const
|
||||||
for( EDA_ITEM* item : m_items )
|
for( EDA_ITEM* item : m_items )
|
||||||
center += item->GetPosition();
|
center += item->GetPosition();
|
||||||
|
|
||||||
center = center / static_cast<unsigned>( m_items.size() );
|
center = center / static_cast<int>( m_items.size() );
|
||||||
return static_cast<VECTOR2I>( center );
|
return static_cast<VECTOR2I>( center );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue