schematic: fix crash in search pane when hit list is empty
std::all_of also returns true for an empty set
This commit is contained in:
parent
2612b49698
commit
7f250870fe
|
@ -93,7 +93,7 @@ void SCH_SEARCH_HANDLER::SelectItems( std::vector<long>& aItemRows )
|
|||
|
||||
m_frame->GetToolManager()->RunAction( EE_ACTIONS::clearSelection, true );
|
||||
|
||||
if( allHitsOnSamePage )
|
||||
if( allHitsOnSamePage && !selectedHits.empty() )
|
||||
{
|
||||
m_frame->SetCurrentSheet( *selectedHits.front().sheetPath );
|
||||
m_frame->DisplayCurrentSheet();
|
||||
|
@ -349,4 +349,4 @@ wxString LABEL_SEARCH_HANDLER::GetResultCell( int aRow, int aCol )
|
|||
return m_frame->MessageTextFromValue( lbl->GetPosition().y );
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue