From 02cfab42660b2312bbc794e503699344aa0b5ef6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 5 Sep 2016 15:46:29 +0200 Subject: [PATCH] Display a message when a locked component is not removed --- pcbnew/board_netlist_updater.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pcbnew/board_netlist_updater.cpp b/pcbnew/board_netlist_updater.cpp index 7088798302..ffe5cac447 100644 --- a/pcbnew/board_netlist_updater.cpp +++ b/pcbnew/board_netlist_updater.cpp @@ -429,9 +429,6 @@ bool BOARD_NETLIST_UPDATER::deleteUnusedComponents( NETLIST& aNetlist ) { nextModule = module->Next(); - if( module->IsLocked() ) - continue; - if( m_lookupByTimestamp ) component = aNetlist.GetComponentByTimeStamp( module->GetPath() ); else @@ -439,6 +436,14 @@ bool BOARD_NETLIST_UPDATER::deleteUnusedComponents( NETLIST& aNetlist ) if( component == NULL ) { + if( module->IsLocked() ) + { + msg.Printf( _( "Component %s is locked, skipping removal.\n" ), + GetChars( module->GetReference() ) ); + m_reporter->Report( msg, REPORTER::RPT_INFO ); + continue; + } + msg.Printf( _( "Remove component %s." ), GetChars( module->GetReference() ) ); m_reporter->Report( msg, REPORTER::RPT_ACTION );