Don't re-fetch selection when running select-in-same-sheet.

Fixes https://gitlab.com/kicad/code/kicad/issues/11110

(cherry picked from commit a35ae8cdce)
This commit is contained in:
Jeff Young 2022-03-28 21:06:49 +01:00
parent f89256e51e
commit 1adfca8f2d
1 changed files with 1 additions and 4 deletions

View File

@ -1489,11 +1489,8 @@ int PCB_SELECTION_TOOL::selectSheetContents( const TOOL_EVENT& aEvent )
int PCB_SELECTION_TOOL::selectSameSheet( const TOOL_EVENT& aEvent )
{
if( !selectCursor( true ) )
return 0;
// this function currently only supports footprints since they are only on one sheet.
auto item = m_selection.Front();
EDA_ITEM* item = m_selection.Front();
if( !item )
return 0;