pcbnew: moving object after duplicating leaves previous image visible

Bug #1813038 reported by Aleksandr Sh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Low
Jeff Young

Bug Description

1. Select any object and duplicate it
2. Move. When moving, the previous image of the object is still visible. This lasts until the object is deselected
The screencast demonstrates this on vias, but it works on other objects too.

Application: kicad
Version: (6.0.0-rc1-dev-1569-g3526c9a37), 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
Revision history for this message
Aleksandr Sh (dsa-t) wrote :
Seth Hillbrand (sethh)
Changed in kicad:
importance: Undecided → Low
milestone: none → 6.0.0-rc1
status: New → Triaged
Revision history for this message
Aleksandr Sh (dsa-t) wrote :

This also happens when modifying duplicated graphics.

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 986392d88e9eff86cb80d90d833c7545c9e6d38b
https://git.launchpad.net/kicad/patch/?id=986392d88e9eff86cb80d90d833c7545c9e6d38b

Changed in kicad:
status: In Progress → Fix Committed
tags: added: pcbnew
Revision history for this message
Aleksandr Sh (dsa-t) wrote :

While trying to use this patch with 5.1 branch, I noticed ~2-3x slowdown while moving interf_u board (opengl canvas, ratsnest disabled), compared with a similar debug build without the patch. It takes 434 vs 166 ms to update footprint location.

Does anyone experience something similar?

Application: Pcbnew
Version: (5.1.4-55-g1ed8912f5-dirty), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.62.0 OpenSSL/1.1.1a (WinSSL) zlib/1.2.11 brotli/1.0.7 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.35.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.62.0
    Compiler: GCC 8.2.1 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=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

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

@Aleksandr, do you mean that you applied this patch to your local 5.1 tree and did a build from there? (As far as I'm aware this patch wasn't cherrypicked back into 5.1.)

Revision history for this message
Aleksandr Sh (dsa-t) wrote :

Yes, I ported this to 5.1 revision 1ed8912f5762043489efab1f52e2f1c9330fdf43 and built (because I do not use 6.0 yet but was curious why this wasn't cherry-picked into 5.1). I attached the exact diff.

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

@Aleksandr, cool. I've made a modification to the fix. Can you try it and see if it fixes the performance issue? If so I'll cherry-pick the two of them back to 5.1.

Revision history for this message
Aleksandr Sh (dsa-t) wrote :

With the attached here patch applied, the performance when moving duplicated items is still low. But when duplicating, the duplicated items do not follow the cursor at all, until I zoom/pan. Also, when moving lines/polygons/zones, their control points now do not move with the rest of the item.

If the first fix is reverted, then when moving items, they do not follow the cursor until I zoom/pan.

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

Yeah, there were a bunch of fixes to the point editor which this is now running into. There may be too many divergences to backport this one. However, let me try one more idea....

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

@Aleksandr, new bits up. Let me know if this one works any better in the 5.1 tree...

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

@Jeff- I pushed a small mod here to focus on the duplication action. Let me know if it misses any of the cases you were seeing

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

Cool. I'll keep an eye out...

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.