diff -ru kicad-2010.05.27/eeschema/class_drawsheetpath.cpp kicad-2010.05.27-592566/eeschema/class_drawsheetpath.cpp
--- kicad-2010.05.27/eeschema/class_drawsheetpath.cpp 2010-05-28 21:47:33.000000000 +0200
+++ kicad-2010.05.27-592566/eeschema/class_drawsheetpath.cpp 2010-06-11 23:08:57.000000000 +0200
@@ -335,7 +335,7 @@
}
else
{
- if( drawItem->Matches( aSearchData, Last() ) )
+ if( drawItem->Matches( aSearchData, this ) )
return drawItem;
}
diff -ru kicad-2010.05.27/eeschema/find.cpp kicad-2010.05.27-592566/eeschema/find.cpp
--- kicad-2010.05.27/eeschema/find.cpp 2010-05-28 21:47:32.000000000 +0200
+++ kicad-2010.05.27-592566/eeschema/find.cpp 2010-06-11 23:10:14.000000000 +0200
@@ -290,7 +290,7 @@
*/
void WinEDA_SchematicFrame::OnFindSchematicItem( wxFindDialogEvent& event )
{
- static SCH_ITEM* lastItem = NULL;
+ static SCH_ITEM* lastItem = NULL;
SCH_SHEET_LIST schematic;
wxString msg;
@@ -301,7 +301,7 @@
searchCriteria.SetFindString( event.GetFindString() );
searchCriteria.SetReplaceString( event.GetReplaceString() );
- if( event.GetFlags() & FR_CURRENT_SHEET_ONLY )
+ if( event.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
{
sheetFoundIn = m_CurrentSheet;
lastItem = m_CurrentSheet->MatchNextItem( searchCriteria, lastItem );