Eeschema: fix find and replace bug where replace value lags by one cycle. (fixes lp:1517101)

This commit is contained in:
Chris Pavlina 2015-11-18 10:38:46 -05:00 committed by Wayne Stambaugh
parent 72b0593fdb
commit bbba5d5c47
3 changed files with 12 additions and 0 deletions

View File

@ -368,6 +368,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
searchCriteria.SetFlags( aEvent.GetFlags() );
searchCriteria.SetFindString( aEvent.GetFindString() );
searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
m_foundItems.SetReplaceString( aEvent.GetReplaceString() );
if( IsSearchCacheObsolete( searchCriteria ) )
{

View File

@ -503,6 +503,12 @@ SEARCH_RESULT SCH_FIND_COLLECTOR::Inspect( EDA_ITEM* aItem, const void* aTestDat
}
void SCH_FIND_COLLECTOR::SetReplaceString( const wxString &aReplaceString )
{
m_findReplaceData.SetReplaceString( aReplaceString );
}
void SCH_FIND_COLLECTOR::Collect( SCH_FIND_REPLACE_DATA& aFindReplaceData,
SCH_SHEET_PATH* aSheetPath )
{

View File

@ -352,6 +352,11 @@ public:
SEARCH_RESULT Inspect( EDA_ITEM* aItem, const void* aTestData = NULL );
/**
* Update the replace string without changing anything else.
*/
void SetReplaceString( const wxString &aReplaceString );
/**
* Function Collect
* scans \a aSheetPath using this class's Inspector method for items matching