← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] Update PCB from Schematic hotkey in pcbnew and bug in schematic filename

 

Hey Dan,

I have a few comments on your patches.

The "Update PCB from Schematic" patch uses a duplicate hotkey.  F8 is
already assigned to the HK_SWITCH_LAYER_TO_INNER4 command ID.  Check the
pcbnew/hotkeys.cpp file for the list of assigned hotkey.  Also, you are
using F8 as a menu accelerator not a hotkey which requires you to add
the IS_ACCEL HOTKEY_ACTION_TYPE to the AddHotkeyName() call.  You are
going to have to choose a different hotkey and resubmit your patch.

Technically the file name fix patch works but you should use the
wxFileName( path, name, ext) ctor to create the full file name.  I've
been trying to weed out this particular issue in KiCad but I must have
missed this one.  Also, there is no need to wrap "%s.%s" in with the
internationalization macro _().  There is no text to translate in the
string.  I will fix this one now that I know where the issue exists.

Thanks,

Wayne

On 9/25/2017 7:19 PM, Dan Green wrote:
> Hi all, here are two patches to address some minor issues with the "Update PCB from Schematic” tool when called from pcbnew. The first adds the F8 hotkey to match eeschema. The second fixes a bug that happens if the project name contains a period (e.g.: MyProject_rev1.2). In this case, the wxFileName command SetExt() would detect an existing extension as “2” and replace it with “sch”. Thus using the tool from pcbnew would make it look for (and hopefully not find!) MyProject_rev1.sch. The bug wouldn’t happen if the schematic window was already open, so it was pretty rare.
> thanks!
> Dan
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References