Commit 3e9bb6b8 authored by Maciej Suminski's avatar Maciej Suminski

SELECTION::GetCenter() returns VECTOR2I instead of wxPoint.

parent c2bd2491
......@@ -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();
......
......@@ -931,9 +931,9 @@ void SELECTION::clear()
}
wxPoint SELECTION::GetCenter() const
VECTOR2I SELECTION::GetCenter() const
{
wxPoint centre;
VECTOR2I centre;
if( Size() == 1 )
{
......
......@@ -70,7 +70,7 @@ struct SELECTION
return static_cast<T*>( 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment