Pcbnew does not allow deleting locked footprints

Bug #1806507 reported by Evan Shultz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Seth Hillbrand

Bug Description

If I have placed one or more footprints on a board and locked them, they cannot be directly deleted. When I press the Delete key (or Backspace or use the RMB menu) the footprints are unhighlighted and Pcbnew goes back to an idle state without giving the user any feedback. I must unlock the footprints to delete them.

My expectation would be that Pcbnew recognizes what I've done and asks for confirmation. If I confirm, the footprints would be deleted even if they're locked.

I can see this being a little tricky, however. What if there are some locked and some unlocked footprints in the selection set? Should the dialog includes a list of all ref des I've selected? Just a count of all locked footprints? Should both locked and unlocked be displayed? Should the unlocked ones be deleted and I'm only prompted for confirmation of locked footprints? Perhaps just a simple text note in the status bar of Pcbnew alerting the user that the footprints cannot be deleted because some of the selected footprints are locked? In some way, those questions can be resolved so pressing the Delete key doesn't result in the operation being cancelled without any user notification.

Application: kicad
Version: (6.0.0-rc1-dev-1298-g0bceb69fe), 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 7 (build 7601, Service Pack 1), 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

Revision history for this message
John Beard (john-j-beard) wrote :

I think there should be a simple time-limited feedback mechanism that:

* Does not invoke any kind of dialog that need interaction (e.g. an OK dialog)
* Does not substantially block the working area
* Doesn't cover up normal status bar elements for an indefinite time

Perhaps the same popup that is used for self-intersecting polygons? Or something like the Android "toast" mechanism.

I'd actually like the same mechanism to be used for a lot more feedback, as it reassuring to know what KiCad is doing when it's non-obvious, not visible (too small or off screen) or ambiguous.

Revision history for this message
Jeff Young (jeyjey) wrote : Re: [Bug 1806507] Re: Pcbnew does not allow deleting locked footprints

I agree. I did move the “Select Copy Origin” message to the Self-Intersecting Polygon mechanism, and it was a very simple code change.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@John, I doubt your going to get much push back on this idea. Most KiCad users tend to not like the unnecessary use of modal dialogs as warnings. I count myself among those users. Maybe we should make this a UI policy going forward.

Revision history for this message
Seth Hillbrand (sethh) wrote :

What if the first press of the delete key deletes all unlocked elements and leaves the locked elements selected? Then the UI message could show up with the cursor saying something like "Press delete again to remove locked elements". That might hit all objectives for this bug report.

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

I think Seth's idea is great.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Me too!

On 12/4/2018 12:11 PM, Jeff Young wrote:
> I think Seth's idea is great.
>

Seth Hillbrand (sethh)
Changed in kicad:
assignee: nobody → Seth Hillbrand (sethh)
importance: Undecided → Low
milestone: none → 5.1.0
status: New → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Evan Shultz (evan-shultz) wrote :

Seth's suggestion and the implementation were one of my proposals as well and it's working nicely in the version below. This can be closed for me.

GIF of the feature in action attached. Note that the second delete must be done using the keyboard and undo also "undoes" each delete separately.

Application: kicad
Version: (6.0.0-rc1-dev-1521-g81a0ab4d7), 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

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.