From 0011586372aac11d1d264ccc531d7d1bfae55e7a Mon Sep 17 00:00:00 2001 From: John Beard <john.j.beard@gmail.com> Date: Fri, 24 Jan 2025 20:24:41 +0800 Subject: [PATCH] Position relative: don't run with no selection --- pcbnew/tools/position_relative_tool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/position_relative_tool.cpp b/pcbnew/tools/position_relative_tool.cpp index 415913addc..0ab40f97df 100644 --- a/pcbnew/tools/position_relative_tool.cpp +++ b/pcbnew/tools/position_relative_tool.cpp @@ -170,6 +170,9 @@ int POSITION_RELATIVE_TOOL::PositionRelativeInteractively( const TOOL_EVENT& aEv positionRelativeClientSelectionFilter, !m_isFootprintEditor /* prompt user regarding locked items */ ); + if( selection.Empty() ) + return 0; + if( m_isFootprintEditor && !frame()->GetModel() ) return 0;