pcbnew line editor doesn't finish on closed

Bug #1832911 reported by Seth Hillbrand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Undecided
Jeff Young

Bug Description

In 5.1, finishing a line on another line's endpoint (if they were on the same layer) would stop drawing. In the current master, this no longer occurs.

Steps to reproduce:
1) In pcbnew, start the line tool
2) Draw a triangle and ensure that the last vertex ends on the first vertex (notice that there is a circle/cross)
3) At this point, the next line segment should not be drawn

Application: ModEdit
Version: (5.1.0-988-g7d69a917b-dirty), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: GCC 8.3.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    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
Revision history for this message
Seth Hillbrand (sethh) wrote :

@Jeff-

This is caused (I think) by the new tool actions handling.

I'm attaching a patch but it would change many things in ways I'm not sure are correct. Can you think of a better way to handle this?

Revision history for this message
Jeff Young (jeyjey) wrote : Re: [Bug 1832911] Re: pcbnew line editor doesn't finish on closed

@Seth,

I don’t think that part of the actions handling has changed. But either way, your patch would break a whole bunch of stuff.

What activate do you think is causing problems? (In the past it’s usually been the PointEditor.)

> On 15 Jun 2019, at 18:58, Seth Hillbrand <email address hidden> wrote:
>
> @Jeff-
>
> This is caused (I think) by the new tool actions handling.
>
> I'm attaching a patch but it would change many things in ways I'm not
> sure are correct. Can you think of a better way to handle this?
>
>
> ** Patch added: "0001-tools-Don-t-cancel-interactive-on-activate.patch"
> https://bugs.launchpad.net/kicad/+bug/1832911/+attachment/5270938/+files/0001-tools-Don-t-cancel-interactive-on-activate.patch
>
> --
> You received this bug notification because you are a member of KiCad Bug
> Squad, which is subscribed to KiCad.
> https://bugs.launchpad.net/bugs/1832911
>
> Title:
> pcbnew line editor doesn't finish on closed
>
> Status in KiCad:
> New
>
> Bug description:
> In 5.1, finishing a line on another line's endpoint (if they were on
> the same layer) would stop drawing. In the current master, this no
> longer occurs.
>
> Steps to reproduce:
> 1) In pcbnew, start the line tool
> 2) Draw a triangle and ensure that the last vertex ends on the first vertex (notice that there is a circle/cross)
> 3) At this point, the next line segment should not be drawn
>
> Application: ModEdit
> Version: (5.1.0-988-g7d69a917b-dirty), release build
> Libraries:
> wxWidgets 3.0.4
> libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
> Platform: Linux 4.19.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
> Boost: 1.67.0
> OpenCASCADE Community Edition: 6.9.1
> Curl: 7.64.0
> Compiler: GCC 8.3.0 with C++ ABI 1013
>
> Build settings:
> KICAD_SCRIPTING=ON
> KICAD_SCRIPTING_MODULES=ON
> KICAD_SCRIPTING_PYTHON3=ON
> KICAD_SCRIPTING_WXPYTHON=ON
> KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
> KICAD_SCRIPTING_ACTION_MENU=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_USE_OCC=OFF
> KICAD_SPICE=ON
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1832911/+subscriptions

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

Yeah, it's the damn POINT_EDITOR again. Let me dig into it (I suspect I can use one of the previous solutions once I remember what they were).

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

Thanks Jeff. Was it ae8daee83?

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

If I'm reading that correctly, we need to set a flag on the newly created segment?

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

Actually, it appears to be running afoul of both the POINT_EDITOR (because the new segments weren't getting flagged as new) and the SELECTION_TOOL (because the ending mouse click is somehow leaking through). I have a hack for the second already in eeschema's selection tool, so I added it to pcbnew's. I sure would like to know why it happens, though.

@Tom, should click events go to all running tools? If so, is there a way to prevent that? If not, do you have any idea what might be going on here?

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

(Note: event order is different on the Mac, so I actually see the opposite problem to Seth: segments are never chained for me. So it's possible my fixes won't address his issues....)

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Jeff Young (jeyjey)
Revision history for this message
Jeff Young (jeyjey) wrote :

@Seth, yes that's the recent one. The older one was during 5.0 development: a9fa66bb418099d61dd90da38f5a3b4b6f2561c5.

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

@Seth, yes, my commit in #8 sets the IS_NEW flags (and applies the hack to the SELECTION_TOOL).

Changed in kicad:
milestone: none → 6.0.0-rc1
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.