← Back to team overview

kicad-developers team mailing list archive

[PATCH] Change reporter message of footprint missmatch to warning on netlist-import

 

Hi,

this patch just fixes a small thing that may irritate beginners to the
program (at least in a recent training some people were a bit confused).

Hope this is the rigth way to do this (at least I tried to stick to the
guidelines i found).

Greets
Marco
From 79c21b449d97ab625c8d57d37b53fe0443287f4d Mon Sep 17 00:00:00 2001
From: Marco Sterbik <madbadmax00@xxxxxxxxx>
Date: Wed, 22 Feb 2017 13:17:11 +0100
Subject: [PATCH] Change reporter message of footprint missmatch to warning on
 netlist-import
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.11.1"

This is a multi-part message in MIME format.
--------------2.11.1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


The message of a changed footprint during netlist-import in pcbnew was declared
as RPT_UNDFINED and therefor the filter didn't work correctly ('Warning' was
in the message-string).
This makes the message a proper warning and enables filtering as expected.
---
 pcbnew/netlist.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


--------------2.11.1
Content-Type: text/x-patch; name="0001-Change-reporter-message-of-footprint-missmatch-to-wa.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Change-reporter-message-of-footprint-missmatch-to-wa.patch"

diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp
index a8108f28a..5ceb8cfe2 100644
--- a/pcbnew/netlist.cpp
+++ b/pcbnew/netlist.cpp
@@ -273,11 +273,11 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
         {
             if( aReporter )
             {
-                msg.Printf( _( "* Warning: component '%s': board footprint '%s', netlist footprint '%s'\n" ),
+                msg.Printf( _( "Footprint of component '%s' changed: board footprint '%s', netlist footprint '%s'\n" ),
                             GetChars( component->GetReference() ),
                             GetChars( fpOnBoard->GetFPID().Format() ),
                             GetChars( component->GetFPID().Format() ) );
-                aReporter->Report( msg );
+                aReporter->Report( msg, REPORTER::RPT_WARNING );
             }
 
             continue;

--------------2.11.1--



Follow ups