From b36f9822720c27af476690cca9c14f46834d6c98 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 11 Jun 2019 01:00:15 +0100 Subject: [PATCH] Fix typo introduced in DLIST erradication. Fixes: lp:1832030 * https://bugs.launchpad.net/kicad/+bug/1832030 --- pcbnew/kicad_clipboard.cpp | 2 +- pcbnew/tools/pcbnew_control.cpp | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp index 7fcf81efdd..701c4729ff 100644 --- a/pcbnew/kicad_clipboard.cpp +++ b/pcbnew/kicad_clipboard.cpp @@ -83,7 +83,7 @@ void CLIPBOARD_IO::SaveSelection( const PCBNEW_SELECTION& aSelected ) ( i->Type() != PCB_PAD_T ) ) { onlyModuleParts = false; - continue; + break; } } diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index f679eae3b1..14a066dbcb 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -771,7 +771,7 @@ static void moveNoFlagToVector( std::deque& aList, std::vector& { std::copy_if( aList.begin(), aList.end(), std::back_inserter( aTarget ), [](T aItem){ - bool retval = aItem->GetFlags() & FLAG0; + bool retval = ( aItem->GetFlags() & FLAG0 ) == 0; aItem->ClearFlags( FLAG0 ); return retval; } ); @@ -876,27 +876,19 @@ int PCBNEW_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName ) if( !brd ) return 1; - // Mark existing items, in order to know what are the new items - // to be ble to select only the new items after loadind + // Mark existing items, in order to know what are the new items so we can select only + // the new items after loading for( auto track : brd->Tracks() ) - { track->SetFlags( FLAG0 ); - } for( auto module : brd->Modules() ) - { module->SetFlags( FLAG0 ); - } for( auto drawing : brd->Drawings() ) - { drawing->SetFlags( FLAG0 ); - } for( auto zone : brd->Zones() ) - { zone->SetFlags( FLAG0 ); - } // Keep also the count of copper layers, to adjust if necessary int initialCopperLayerCount = brd->GetCopperLayerCount();