diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index e34c3b4748..4ed16f26bb 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -618,7 +618,8 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent ) editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED ); } - wxPoint rotPoint = selection.GetCenter(); + VECTOR2I rp = selection.GetCenter(); + wxPoint rotPoint( rp.x, rp.y ); for( unsigned int i = 0; i < selection.items.GetCount(); ++i ) { @@ -769,7 +770,8 @@ int EDIT_TOOL::CreateArray( const TOOL_EVENT& aEvent ) DIALOG_CREATE_ARRAY::ARRAY_OPTIONS* array_opts = NULL; - const wxPoint rotPoint = selection.GetCenter(); + VECTOR2I rp = selection.GetCenter(); + const wxPoint rotPoint( rp.x, rp.y ); DIALOG_CREATE_ARRAY dialog( editFrame, rotPoint, &array_opts ); int ret = dialog.ShowModal(); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d715022136..dc9832a17d 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -931,9 +931,9 @@ void SELECTION::clear() } -wxPoint SELECTION::GetCenter() const +VECTOR2I SELECTION::GetCenter() const { - wxPoint centre; + VECTOR2I centre; if( Size() == 1 ) { diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 63c7128c7d..ad6e03e6c3 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -70,7 +70,7 @@ struct SELECTION return static_cast( items.GetPickedItem( aIndex ) ); } - wxPoint GetCenter() const; + VECTOR2I GetCenter() const; private: /// Clears both the VIEW_GROUP and set of selected items. Please note that it does not