Be more pedantic about RECURSE_MODE.

Also fixes an invalid iterator bug.

Also adds mirroring support for PCB_GROUPs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21107
This commit is contained in:
Jeff Young
2025-06-12 11:21:28 +01:00
parent c159b06f57
commit 7fbf51b17c
24 changed files with 73 additions and 58 deletions
+2 -2
View File
@@ -358,7 +358,7 @@ int SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext( const TOOL_EVENT& aEvent )
SCH_COMMIT commit( m_frame );
SCH_ITEM* sch_item = static_cast<SCH_ITEM*>( item );
commit.Modify( sch_item, sheet->LastScreen() );
commit.Modify( sch_item, sheet->LastScreen(), RECURSE_MODE::NO_RECURSE );
if( item->Replace( data, sheet ) )
{
@@ -398,7 +398,7 @@ int SCH_FIND_REPLACE_TOOL::ReplaceAll( const TOOL_EVENT& aEvent )
auto doReplace =
[&]( SCH_ITEM* aItem, SCH_SHEET_PATH* aSheet, EDA_SEARCH_DATA& aData )
{
commit.Modify( aItem, aSheet->LastScreen() );
commit.Modify( aItem, aSheet->LastScreen(), RECURSE_MODE::NO_RECURSE );
if( aItem->Replace( aData, aSheet ) )
{