Impossible to swap names of copper layers

Bug #1842665 reported by Micha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Jeff Young

Bug Description

Very similar to: https://bugs.launchpad.net/kicad/+bug/1789390 But as I'm on the new version and this fix has been released a while ago, I think it's not the same.

Menu:
Board setup -> Layers

When I try to swap 2 names by hand, giving one copper layer the name of another, and changing the other one to the one I just changed, the change will not be registered.

When renaming the first with a temporary name, and then renaming the other one with the previous name it might get registered, but it usually doesn't. The only solid way is changing both to a temporary name, click OK, and change them again to the desired names.

Application: Pcbnew
Version: (5.1.4)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: pcbnew
tags: added: pcbnew
Changed in kicad:
importance: Undecided → Low
milestone: none → 5.1.5
status: New → Triaged
importance: Low → Medium
Jeff Young (jeyjey)
Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: Triaged → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision f491b7fff7205fba6868bd25b4b12886101c1d88
https://git.launchpad.net/kicad/patch/?id=f491b7fff7205fba6868bd25b4b12886101c1d88

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Ian McInerney (imcinerney) wrote :

@Jeff, I think we need to keep the duplicate checking in the SetLayerName function since it is also called from the board loading functions, the Eagle import plugin and is also passed out to the Python interface. Doing it this way doesn't guard against malformed files that may have been modified to have duplicate layer names, or script writers that accidentally use duplicate layer names (so it could introduce regressions in these cases).

Revision history for this message
Jeff Young (jeyjey) wrote :

@Ian, the layers' primary keys are their indexes. Having duplicate names won't result in malformed files.

Items are assigned to layers based on secondary key (the names), but dropping the user names will mess that up even more than having duplicate names.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.