From 534bb97dc5c147ee958d6730a3fadf45350a1a94 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 11 Jun 2010 14:34:20 -0400 Subject: [PATCH] Closes bug report 592566. * Field match method expected SCH_SHEET_PATH pointer type not SCH_SHEET pointer type. --- eeschema/class_drawsheetpath.cpp | 2 +- eeschema/find.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/class_drawsheetpath.cpp b/eeschema/class_drawsheetpath.cpp index 5c6ba30de8..8c06b6283f 100644 --- a/eeschema/class_drawsheetpath.cpp +++ b/eeschema/class_drawsheetpath.cpp @@ -335,7 +335,7 @@ SCH_ITEM* SCH_SHEET_PATH::MatchNextItem( wxFindReplaceData& aSearchData, } else { - if( drawItem->Matches( aSearchData, Last() ) ) + if( drawItem->Matches( aSearchData, this ) ) return drawItem; } diff --git a/eeschema/find.cpp b/eeschema/find.cpp index 642f0cbf4f..4918d43bed 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -290,7 +290,7 @@ SCH_ITEM* WinEDA_SchematicFrame::FindComponentAndItem( const wxString& component */ 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 @@ void WinEDA_SchematicFrame::OnFindSchematicItem( wxFindDialogEvent& event ) 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 );