symbol editor can't handle large amount of clarification menu items

Bug #1792146 reported by eelik on 2018-09-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Undecided
Jeff Young

Bug Description

I used symbol editor's pin table to add pins, 14 of them at the moment. I wanted to move them by dragging with mouse. But originally they are located in the same place and the selection clarification menu can't handle too many items. The latest code from launchpad git throws failed assertion:

kicad/eeschema/lib_edit_frame.cpp(1272): assert "m_collectedItems.GetCount() <= MAX_SELECT_ITEM_IDS" failed in locateItem(): Select item clarification context menu size limit exceeded.

It's possible that this happens for other clarification menus, too, maybe also in pcbnew, but I haven't tested.

There really should be no upper limit or it should be very large. One possible GUI solution would be to create hierarchical menus, like

a
b
c
d
e
f
more>
   g
   h
   i
   j
   k
   l
   more>
       etc.

Or open a dialog which could handle all items in a scrollable list.

Application: kicad
Version: (6.0.0-rc1-dev-480-gf5de8cd3e), debug build
Libraries:
    wxWidgets 3.0.3
Platform: Linux 4.13.0-46-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    Compiler: GCC 7.2.0 with C++ ABI 1011

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

Jeff Young (jeyjey) wrote :

This comes up rarely enough that I think your use-case is one of the few. And since the pins are well-ordered, I think a long scrolling menu is fine (and much much less work).

I've bumped up the max from 10 to 200.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: New → In Progress
milestone: none → 5.1.0
eelik (eelik) wrote :

Scrolling menu should be fine as long as it works. Hardcoded limits are always suspicious. I don't know if anyone ever needs more than 200, but who knows? I can't come up with any reasonable solution for all possible situations, though, so I can't complain.

BTW, what's the limit in pcbnew and how it's handled? There could be more than 20 if there are many inner layers.

Jeff Young (jeyjey) wrote :

It's 9 in Pcbnew.

(I don't like hard-coded limits either. But a lot of them were inserted to protect some other area of the code, and I've had my fingers burned removing some of them.)

KiCad Janitor (kicad-janitor) wrote :

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

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

Other bug subscribers