Right-click ignores selection

Bug #168618 reported by Daniel Pope
4
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Low
Unassigned

Bug Description

Right-clicking a selected object does not show the correct popup menu if
the object selected and right-clicked was inside a group (ie. Ctrl-Click
selected).

Instead the popup menu is displayed for the group itself.

I expect the popup shown to correspond to selection itself if the
right-click is within the selection bounds.

Steps to reproduce:

1. Import an image
2. Group the image
3. Ctrl+Click to select the image (not the group)
4. Right-click the selected image

Observed Behaviour:

Popup menu shows "Ungroup"

Expected Behaviour:

Popup menu shows "Image Properties"

Revision history for this message
Bryce Harrington (bryce) wrote :

Confirmed, though these steps:

1. Create three ellipse objects
2. Select all, and Group.
3. Click to select just one of the three ellipse.
4. Right click. Expect to *not* see "ungroup" option, but see it.

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
tt-y (neonblaze-) wrote :

Hello,

I've been trying to find out how to fix this bug, but I got rather lost in the code. Specifically, could someone please tell me where the input event listeners are registered (interface.cpp?) and which files are involved in processing events (I found the big event-handler in event-context.cpp, but it seems to leave the right-click menu to something else). Also, do the SPActionEventVectors have to do with any of this? Thanks.

Revision history for this message
tt-y (neonblaze-) wrote :

I did a bit more searching and found that event-context.cpp registers a handler function which calls sp_ui_context_menu in interface.cpp, which decides what to put in the menu. It seems to me as though the objects in the drawing are being registered with GTK: is it the case that the program relies on GTK for hit detection on drawing objects?

Revision history for this message
bbyak (buliabyak) wrote :

To answer your last question: it may indeed still rely on gtk object determination for the menu. Initially it depended on the object passed with gtk events for everything, but now it has been mostly switched away from it. The selection action in selector tool uses the functions like item_at_point to find out which item was clicked. So you may want to use the same function here too.

Revision history for this message
Tom Davidson (tjd-mit) wrote : Re: [Bug 168618] Re: Right-click ignores selection

I'm assuming step 3 is actually 'ctrl-click to select just one member of the
group'. If so, I don't really see how this is a bug...

I can see it being useful to make sure I've selected exactly the object that
I'm interested in, and then ungrouping the group that it is a member of.
What is the down-side of this behavior?

On Jan 27, 2008 11:37 PM, bbyak <email address hidden> wrote:

> To answer your last question: it may indeed still rely on gtk object
> determination for the menu. Initially it depended on the object passed
> with gtk events for everything, but now it has been mostly switched away
> from it. The selection action in selector tool uses the functions like
> item_at_point to find out which item was clicked. So you may want to use
> the same function here too.
>
> --
> Right-click ignores selection
> https://bugs.launchpad.net/bugs/168618
> You received this bug notification because you are a member of Inkscape
> Bug Team, which is the bug contact for Inkscape.
>

Revision history for this message
tt-y (neonblaze-) wrote :

I think the user might expect to be able to access options like "fill and stroke" when only one object is selected, as opposed to the entire group.

I haven't examined the item_at_point function, but would it be an appropriate solution to have CTRL+click automatically enter the group that the clicked object belongs to?

Revision history for this message
Tom Davidson (tjd-mit) wrote :

Sorry, I see now how current behavior is clearly buggy.

I had actually found a peculiar use for this behavior: Using ctrl-click to verify that the correct group was selected in a busy drawing where several groups have the same bounding boxes (common with some svg figures exported from Matlab). Ctrl-click followed by 'ungroup' actually selects all the members of the parent group, which I could then delete/move/recolor easily.

If you end up implementing this by automatically entering the group on Ctrl-click, then I could still get the same behavior with ctrl-click followed by select-all...

su_v (suv-lp)
tags: added: selection ui
Revision history for this message
jazzynico (jazzynico) wrote :

It works correctly if you double-click on the object (enter group feature) and then right-click. But not when selecting the object directly with Ctrl+Click.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
Beluga (buovjaga) wrote :

Still repro.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92+devel 15099 (GTK3)

Revision history for this message
grey tomorrow (gtomorrow) wrote :

Closing because INVALID: FIXED.

Tested with 1.0beta2 (074b463, 2020-02-02), macOS 10.12.6 (16G2136)
0.92.4 (5da689c313, 2019-01-14), MacPorts

If you feel this issue has been injustly closed, please feel free to open a new issue at http://inkscape.org/report . Thank you.

Closed by: https://gitlab.com/greytomorrow

tags: added: bug-migration
Changed in inkscape:
status: Triaged → Invalid
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.