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

This commit is contained in:
Maciej Suminski 2015-02-20 11:40:36 +01:00
parent c2bd2491f1
commit 3e9bb6b887
3 changed files with 7 additions and 5 deletions

View File

@ -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();

View File

@ -931,9 +931,9 @@ void SELECTION::clear()
}
wxPoint SELECTION::GetCenter() const
VECTOR2I SELECTION::GetCenter() const
{
wxPoint centre;
VECTOR2I centre;
if( Size() == 1 )
{

View File

@ -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