Skip to content

[Select Tool] Clicking with the select tool when zoomed in selects an area of 0 pixels #2009

Closed

Description

@pedropaulosuzuki

Description
When you click a 0x0 area, it should remove the current selection. If you're zoomed in, a 0x0 selection is created instead.

To Reproduce

  1. Open Pinta
  2. Activate the Selection tool
  3. Zoom in such that an image pixel occupies more than 1 screen-space pixel
  4. Click on the canvas

Additional Info

Selection.webm

Version
Latest git

Activity

  1. changed the title [-][Select Tool] Sometimes it's possible to select an area of 0 pixels[/-] [+][Select Tool] Clicking with the select tool when zoomed in selects an area of 0 pixels[/+] on Feb 26, 2026
  2. cameronwhite commented on Mar 1, 2026

    @cameronwhite
    Member

    I think the issue here is that RectangleHandle.HasDragged() does the comparison in view coordinates, so when zoomed in these are scaled up and the delta can become larger than the tolerance. At least with a touchpad, I saw a slight variation in the mouse positions between the mouse down and mouse up events, so this is amplified with the scaling

    Probably this should instead just check whether the resulting rectangle is empty, since that's really what we care about

  3. added a commit that references this issue on Mar 7, 2026
  4. Jaafar-Kamalah commented on Sep 1, 2026

    @Jaafar-Kamalah

    Hi @cameronwhite , I’d like to try solving this issue, do I need to be assigned? This is my first ever open‑source contribution so it might take a bit longer than exptected.

  5. cameronwhite commented on Sep 1, 2026

    @cameronwhite
    Member

    thanks for the interest! You can assign yourself but it's not strictly necessary.
    There was a previous attempt at fixing this in PR #2022, so definitely should have a look at the changes and discussion there

  6. Jaafar-Kamalah commented on Sep 12, 2026

    @Jaafar-Kamalah

    I realized PR #2022 is still active, so I’ll step back from this issue.

  7. added a commit that references this issue on Sep 12, 2026
  8. added this to the 3.2 milestone on Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions