Mouse cannot select a zero-length path with Selector Tool or with Node Tool
#### Summary: I have a path consisting of a single zero-length segment (two nodes at the same place). The path is stroke with a round cap, so I can see a circle of diameter equal to the stroke width. However, with the selector tool I cannot select the object by clicking on it. #### Steps to reproduce: - Create a zero-length path: - Open Inkscape with a new document. - Click the Pen Tool, and create a straight path of two nodes. (One click on the canvas for the first node, double-click at another place for the second node.) - Open the dialog for Fill and Stroke (from menu: Object -\> Fill and Stroke). Chose a flat color for Stoke paint, a decent amount of Stroke width (e.g., 100 px or 10 mm), and select round line cap style. - With the Node Tool, grab either handle and drag it over the other one. If snapping is enabled (snapping cusp node to cusp node), the two nodes will perfectly overlap. Now the XML code of the object should look something like `<path style="stroke:#000000;stroke-width:10;stroke-linecap:round;" d="m 30,20 v 0" id="path1" />`. - Cancel selection (from menu: Edit -\> Deselect). - Using the Selector Tool, hover the mouse over the circle and click on it to select the path object. - Using the Node Tool, click on the circle and select the node handle. #### What should have happened? The mouse pointer should change shape to a move-cross when hovering the mouse over the circle with the Selector Tool. The object should be selected when clicked on it. #### What happened? Inkscape does not recognize that there is a visible object there. Using the Selector Tool, the mouse pointer does not change when hovering over the circle. The object can be selected by dragging out a rectangular selection box around it, or using the Tab key, but still cannot be moved with the mouse to another place. With the Node Tool, it cannot be selected either by clicking on the circle. However, when dragging out a rectangular selection box around it, the object can be selected. Once selected, the node can be moved away as expected. When the length of the path segment is infinitesimally small but non-zero (e.g., `<path d="m 30,20 v 1e-6" ... />`), then everything gets fine and behaves as expected. When the stroke's line cap style is square, the issue remains, but it is masked by another issue (not addressed by the present bug report): we expect a square instead of a circle, but the square is not painted unless the path segment is longer than a certain threshold. \[NB: It is not surprising that the square cap is not painted for a zero-length path segment, as the orientation of the square is mathematically undefined in that limit.\] #### Version info ``` Inkscape 1.4.3 (fcd0343856, 2026-01-01) Compile (Run) GLib version: 2.72.4 GTK version: 3.24.33 (3.24.33) glibmm version: 2.66.2 gtkmm version: 3.24.5 libxml2 version: 2.9.13 libxslt version: 1.1.34 Cairo version: 1.16.0 (1.16.0) Pango version: 1.50.6 (1.50.6) HarfBuzz version: 2.7.4 (2.7.4) OS version: Ubuntu Core 22 ``` Also on ``` Inkscape 1.4 (e7c3feb100, 2024-10-09) Compile (Run) GLib version: 2.84.0 GTK version: 3.24.49 (3.24.49) glibmm version: 2.66.7 gtkmm version: 3.24.9 libxml2 version: 2.9.14 libxslt version: 1.1.35 Cairo version: 1.18.4 (1.18.4) Pango version: 1.56.2 (1.56.3) HarfBuzz version: 10.2.0 (10.2.0) OS version: Debian GNU/Linux 13 (trixie) ```
issue