Footprint group selection problem

Bug #1636214 reported by Art
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
Unassigned

Bug Description

When you have one large footprint in your design (i.e. a can shield that spans the whole board but has pads only along the edges) and you try to select a group of footprints on the board by dragging a rectangle with the mouse pointer, instead of selection tool you get to move that one big footprint. So there is really no way to select multiple objects easily in a case like that. A similar problem arises when you try to do multiple selection in a busy layout. You need to find a spot on the board to start your selection that doesn't have any objects in the close proximity, which can be challenging especially if you are not using high contrast mode and there are components on both sides of the board. The best option would be to move footprints with a M shortcut (which presently works) and leave left click for multiple selection. Left click move is not intuitive anyway. If you try to left click and drag a component in close proximity of other objects, instead of moving the component you get a disambiguation menu. So now you are moving cursor through the menu instead of dragging the component while you are still holding the left button down. When you get to desired menu item you are probably still holding that left button down and the only option you have is to release that button. Naturally nothing happens at this point. So you need to click left mouse button again. Since you started by trying to drag that component, the expectation would be to be able to drag the object immediately after menu item selection, which is not the case. It just highlights the object which is a completely different behavior from the M shortcut, where after selecting from the menu you get to drag the object with no additional clicks required. So now you need to go and click and hold it again to drag it. So now instead of a single mouse click you end up with three.

Application: kicad
Version: 4.0.1-stable release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Tags: cern gal pcbnew
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

I got about halfway through your description before losing my place in the wall of text, but I agree that selecting small objects underneath large ones (what I think you're getting at with the RF can example) is a problem. The "grab vs. draw selection box" algorithm is pretty bad. I'm marking this confirmed; please clarify if I've misunderstood you. We really need a way to draw a selection box in cases where it would otherwise just grab a single object.

Changed in kicad:
status: New → Confirmed
importance: Undecided → Low
tags: added: cern gal pcbnew
Revision history for this message
Art (diametrix) wrote :

You understood it correctly. I'll try to summarize:

1. Selection box function can't be evoked if the starting point has a footprint at mouse pointer location

2. Moving footprint with a mouse left click is stupid

3. Reserve left click for the selection box tool and M shortcut for moving footprints

This is as succinct as I can make it. Does it make it more clear?

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Yup, clear. I agree, mostly. Not sure about #2 - moving with a drag operation is a very standard action in graphics software (which CAD definitely is). But it really needs to be better about choosing which action to do.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I do not agree about #2, this is what happens in many software packages, not only EDA. The common way of enforcing group selection is to hold Shift, which starts additive selection.

Perhaps the selection heuristics could be modified to ignore items that are not entirely visible on the screen, to be considered.

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

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

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I have pushed a patch that aims at improving the selection heuristics. Let me know if you find any issues in the new behavior.

Revision history for this message
Andrzej Wolski (awolski) wrote :

Maciej, in situations like on these images:
https://imgur.com/a/VTv5k
I can't select footprint nor open its properties dialog by double-clicking.
It feels very weird to me. Maybe there is some better solution for this problem?
Or maybe at least there could be an option to enable/disable this filter?

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

@Andrzej, can you attach the board and footprint shown in your images to this bug report? (Feel free to trim down the board to just the problematic area if you don't want to show it publicly, or even email it to me at jeff (at) rokeby (dot) ie).

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Jeff, here at play is the condition that discards footprints that cover >= 90% of the view area (selection_tool.cpp:1593). Perhaps the threshold is too low?

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

Ahh, I see. I don't think there's any threshold that's going to work. It will always be "obvious" to the user what she's trying to do, but far less "obvious" to the computer.

I think there's a 3rd way between Art's #2 and the current state: we should allow left-mouse-button dragging *only* of selected objects. A LMB drag with no selected objects is a selection operation (ie: block selection). If you want to drag a footprint (for instance), select it first and then drag. (The CAD and drawing programs I have on hand all work this way.)

Revision history for this message
Andrzej Wolski (awolski) wrote :

It happens to any footprint at certain zoom level.
I'm attaching the two from images.

Revision history for this message
Andrzej Wolski (awolski) wrote :

Jeff, another idea would be to disallow LMB dragging only for "footprints that cover >= 90% of the view area" . :)

Revision history for this message
Art (diametrix) wrote :

@Jeff
> we should allow left-mouse-button dragging *only* of selected objects.

I second the motion.

Revision history for this message
Andrzej Wolski (awolski) wrote :

If you have already placed components and doing only routing, this might be fine.
But if you beginning a bigger project and have hundreds of components to place, that could be very annoying.

IMHO there could be an option somewhere in the preferences for that, but it should not be forced on all users.

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

If you have hundreds of footprints to place you're going to do it through 't' and 'm', aren't you? (They're a lot faster than dragging.)

Revision history for this message
Andrzej Wolski (awolski) wrote :

Some people prefer dragging with a mouse.
Again, it would be great to have different options to choose from.

Revision history for this message
Art (diametrix) wrote :

@Andrzej

I realize that you can't force your personal preferences on others, but the workflow for all of the layout functions goes through the keyboard. All other actions during the layout are initiated by the keyboard. So using the LMB actually brakes the workflow. That's one.

Two - double clicking a component is not as annoying as not being able to move a component, which, if you use a footprint that spans your whole board, is going to be every single component on your board. So in the first case you have two separate options to do the same thing (move a component) and in the second - zero. Let me do the math here...Nothing into nothin’. Carry the nothin’… :)

And three - the fastest way to get a component when you just start a project and all of them are just sitting in an array would be through Ctr-F without panning mouse cursor to the component (the component goes to the mouse cursor). Unfortunately that functionality doesn't work.

Revision history for this message
Andrzej Wolski (awolski) wrote :

@Art

> All other actions during the layout are initiated by the keyboard.
> So using the LMB actually brakes the workflow. That's one.

This is not true. You can place/edit/move/drag any object with a mouse. You can probably do a whole design with a mouse only.

> Two - double clicking a component is not as annoying as not being able to move a component, which, if > you use a footprint that spans your whole board, is going to be every single component on your board.

I have just checked current repo with this patch reverted, with this sample board:
https://imgur.com/a/Lz2zZ
and I am able to select by clicking and move by mouse and 'm' shortcut every component on the board.
The big footprint does not interfere, and it is not even locked. Only when I try to select by selection box in empty area, it starts moving big footprint instead. I don't know how it worked earlier, maybe some other patch changed it.
When I lock the big footprint, I get a message box while trying to select, and this is the only thing that should be fixed now, because locked footprint should be not selectable/draggable. At least this is how it works in Altium, and how I deal with such situation, it is very simple - just lock the footprint.

Revision history for this message
Art (diametrix) wrote :

@Andrej
>Only when I try to select by selection box in empty area, it starts moving big footprint

It was only the description of the problem in the first place.

>You can probably do a whole design with a mouse only.

Quite possible. I was talking about an efficient work flow, not setting Guinness world record in one handed layout. You've got two hands (I assume), might as well use them.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

The attached patch adds the requested option. I am not sure whether it should enabled or disabled by default.

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

I think enabled by default.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I have just pushed the patch.

Revision history for this message
Andrzej Wolski (awolski) wrote :

Thanks for this patch.
Maybe "do not select large footprints" could also get its checkbox?
I could help doing that if it will be accepted.

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.