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

Fixes https://gitlab.com/kicad/code/kicad/issues/11110
This commit is contained in:
Jeff Young 2022-03-28 21:06:49 +01:00
parent 8706bea3c6
commit a35ae8cdce
1 changed files with 1 additions and 4 deletions

View File

@ -1622,11 +1622,8 @@ int PCB_SELECTION_TOOL::selectSheetContents( const TOOL_EVENT& aEvent )
int PCB_SELECTION_TOOL::selectSameSheet( 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. // 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 ) if( !item )
return 0; return 0;