mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 17:23:44 +00:00
Start with origin for a single-item selection.
(For better or worse, that's what the dialog says it will do.) Fixes https://gitlab.com/kicad/code/kicad/-/issues/15945
This commit is contained in:
parent
5c71d26b25
commit
22947c840d
@ -57,12 +57,17 @@ void ARRAY_CREATOR::Invoke()
|
||||
|
||||
FOOTPRINT* const fp = m_isFootprintEditor ? m_parent.GetBoard()->GetFirstFootprint() : nullptr;
|
||||
|
||||
const bool enableArrayNumbering = m_isFootprintEditor;
|
||||
const VECTOR2I rotPoint = m_selection.GetCenter();
|
||||
const bool enableArrayNumbering = m_isFootprintEditor;
|
||||
VECTOR2I origin;
|
||||
|
||||
if( m_selection.Size() == 1 )
|
||||
origin = m_selection.Items()[0]->GetPosition();
|
||||
else
|
||||
origin = m_selection.GetCenter();
|
||||
|
||||
std::unique_ptr<ARRAY_OPTIONS> array_opts;
|
||||
|
||||
DIALOG_CREATE_ARRAY dialog( &m_parent, array_opts, enableArrayNumbering, rotPoint );
|
||||
DIALOG_CREATE_ARRAY dialog( &m_parent, array_opts, enableArrayNumbering, origin );
|
||||
|
||||
int ret = dialog.ShowModal();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user