Flip block around center instead of first item's anchor.

Fixes: lp:1789775
* https://bugs.launchpad.net/kicad/+bug/1789775
This commit is contained in:
Jeff Young 2019-08-02 16:07:01 -06:00
parent f756af788e
commit b8a03be869
1 changed files with 3 additions and 2 deletions

View File

@ -758,13 +758,14 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
{
auto& selection = m_selectionTool->RequestSelection(
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); }, nullptr, ! m_dragging );
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); },
nullptr, ! m_dragging );
if( selection.Empty() )
return 0;
updateModificationPoint( selection );
VECTOR2I modPoint = selection.GetReferencePoint();
VECTOR2I modPoint = selection.GetCenter();
bool leftRight = frame()->Settings().m_FlipLeftRight;
// When editing modules, all items have the same parent