diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f951885c07..716adbba82 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1453,6 +1453,10 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) true /* prompt user regarding locked items */ ); } + // Did we filter everything out? If so, don't try to operate further + if( selection.Empty() ) + return 0; + updateModificationPoint( selection ); VECTOR2I refPt = selection.GetReferencePoint(); @@ -2251,6 +2255,10 @@ bool EDIT_TOOL::updateModificationPoint( PCB_SELECTION& aSelection ) if( m_dragging && aSelection.HasReferencePoint() ) return false; + // Can't modify an empty group + if( aSelection.Empty() ) + return false; + // When there is only one item selected, the reference point is its position... if( aSelection.Size() == 1 ) {