From b8a03be8698db69ba02c7a9f4eec461fe02f9372 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 2 Aug 2019 16:07:01 -0600 Subject: [PATCH] Flip block around center instead of first item's anchor. Fixes: lp:1789775 * https://bugs.launchpad.net/kicad/+bug/1789775 --- pcbnew/tools/edit_tool.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 9a1e2a83a2..1963f24ba6 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -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