Snap rotation center to half-grid, not grid
This commit is contained in:
parent
e57bde6582
commit
3960c2441b
|
@ -544,7 +544,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
|
|||
case SCH_SHEET_T:
|
||||
{
|
||||
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( head );
|
||||
rotPoint = m_frame->GetNearestGridPosition( sheet->GetRotationCenter() );
|
||||
rotPoint = m_frame->GetNearestHalfGridPosition( sheet->GetRotationCenter() );
|
||||
|
||||
// Rotate the sheet on itself. Sheets do not have an anchor point.
|
||||
for( int i = 0; clockwise ? i < 3 : i < 1; ++i )
|
||||
|
@ -565,7 +565,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
|
|||
if( moving && selection.HasReferencePoint() )
|
||||
rotPoint = (wxPoint) selection.GetReferencePoint();
|
||||
else
|
||||
rotPoint = m_frame->GetNearestGridPosition( (wxPoint) selection.GetCenter() );
|
||||
rotPoint = m_frame->GetNearestHalfGridPosition( (wxPoint) selection.GetCenter() );
|
||||
}
|
||||
|
||||
for( unsigned ii = 0; ii < selection.GetSize(); ii++ )
|
||||
|
|
|
@ -161,7 +161,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
|
|||
if( selection.GetSize() == 1 )
|
||||
rotPoint = item->GetPosition();
|
||||
else
|
||||
rotPoint = m_frame->GetNearestGridPosition( mapCoords( selection.GetCenter() ) );
|
||||
rotPoint = m_frame->GetNearestHalfGridPosition( mapCoords( selection.GetCenter() ) );
|
||||
|
||||
for( unsigned ii = 0; ii < selection.GetSize(); ii++ )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue