Don't find when the dialog isn't open or the search is blank (which resulted in full highlighting)
Fix #9056
This commit is contained in:
parent
3b7f5a3db7
commit
74b8f14ec3
|
@ -250,7 +250,12 @@ int SCH_EDITOR_CONTROL::UpdateFind( const TOOL_EVENT& aEvent )
|
|||
auto visit =
|
||||
[&]( EDA_ITEM* aItem, SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
if( aItem->Matches( data, aSheet ) )
|
||||
// We may get triggered when the dialog is not opened due to binding SelectedItemsModified
|
||||
// we also get triggered when the find dialog is closed....so we need to double check the dialog is open
|
||||
|
||||
if( m_frame->m_findReplaceDialog != nullptr
|
||||
&& !data.GetFindString().IsEmpty()
|
||||
&& aItem->Matches( data, aSheet ) )
|
||||
{
|
||||
aItem->SetForceVisible( true );
|
||||
m_selectionTool->BrightenItem( aItem );
|
||||
|
|
Loading…
Reference in New Issue