Add Eeschema replace code.
* Enable replace toolbar button and menu entry. * Improve find replace logging granularity. * Fix find and replace dialog control hiding and disabling. * Minor improvements to the SCH_FIND_REPLACE_DATA object. * Move find collector list iterator into the collector object. * Add visibility override flag to EDA_ITEM to temporarily show items that are hidden during find and replace.
This commit is contained in:
@@ -194,6 +194,16 @@ bool EDA_ITEM::Matches( const wxString& aText, wxFindReplaceData& aSearchData )
|
||||
}
|
||||
|
||||
|
||||
bool EDA_ITEM::Replace( wxFindReplaceData& aSearchData, wxString& aText )
|
||||
{
|
||||
wxCHECK_MSG( IsReplaceable(), false,
|
||||
wxT( "Attempt to replace text in <" ) + GetClass() + wxT( "> item." ) );
|
||||
|
||||
return aText.Replace( aSearchData.GetFindString(),
|
||||
aSearchData.GetReplaceString(), false ) != 0;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_ITEM::operator<( const EDA_ITEM& aItem ) const
|
||||
{
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Less than operator not defined for item type %s." ),
|
||||
|
||||
Reference in New Issue
Block a user