Remove a change committed erroneously
This commit is contained in:
parent
ad48723deb
commit
3d38a7b252
|
@ -321,20 +321,6 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( m_foundItems.GetCount() == 0 )
|
if( m_foundItems.GetCount() == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Refresh the search cache in case something has changed. This prevents any stale
|
|
||||||
// pointers from crashing Eeschema when the wxEVT_FIND_CLOSE event is handled.
|
|
||||||
if( IsSearchCacheObsolete( searchCriteria ) )
|
|
||||||
{
|
|
||||||
if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
|
|
||||||
{
|
|
||||||
m_foundItems.Collect( searchCriteria, m_CurrentSheet );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_foundItems.Collect( searchCriteria );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( IsSearchCacheObsolete( searchCriteria ) )
|
else if( IsSearchCacheObsolete( searchCriteria ) )
|
||||||
{
|
{
|
||||||
|
@ -367,23 +353,6 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
|
||||||
SCH_SHEET_PATH* sheet;
|
SCH_SHEET_PATH* sheet;
|
||||||
SCH_SHEET_LIST schematic;
|
SCH_SHEET_LIST schematic;
|
||||||
SCH_FIND_COLLECTOR_DATA data;
|
SCH_FIND_COLLECTOR_DATA data;
|
||||||
SCH_FIND_REPLACE_DATA searchCriteria;
|
|
||||||
|
|
||||||
searchCriteria.SetFlags( aEvent.GetFlags() );
|
|
||||||
searchCriteria.SetFindString( aEvent.GetFindString() );
|
|
||||||
searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
|
|
||||||
|
|
||||||
if( IsSearchCacheObsolete( searchCriteria ) )
|
|
||||||
{
|
|
||||||
if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
|
|
||||||
{
|
|
||||||
m_foundItems.Collect( searchCriteria, m_CurrentSheet );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_foundItems.Collect( searchCriteria );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL )
|
if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL )
|
||||||
{
|
{
|
||||||
|
@ -461,6 +430,20 @@ void SCH_EDIT_FRAME::updateFindReplaceView( wxFindDialogEvent& aEvent )
|
||||||
searchCriteria.SetFindString( aEvent.GetFindString() );
|
searchCriteria.SetFindString( aEvent.GetFindString() );
|
||||||
searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
|
searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
|
||||||
|
|
||||||
|
// Refresh the search cache in case something has changed. This prevents any stale
|
||||||
|
// pointers.
|
||||||
|
if( IsSearchCacheObsolete( searchCriteria ) )
|
||||||
|
{
|
||||||
|
if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
|
||||||
|
{
|
||||||
|
m_foundItems.Collect( searchCriteria, m_CurrentSheet );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_foundItems.Collect( searchCriteria );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( m_foundItems.GetItem( data ) != NULL )
|
if( m_foundItems.GetItem( data ) != NULL )
|
||||||
{
|
{
|
||||||
wxLogTrace( traceFindReplace, wxT( "Found " ) + m_foundItems.GetText() );
|
wxLogTrace( traceFindReplace, wxT( "Found " ) + m_foundItems.GetText() );
|
||||||
|
|
Loading…
Reference in New Issue