on screen snap message, undefined to undefined

Bug #1255764 reported by Cojnel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Diederik van Lierop

Bug Description

make sure
Edit > Preferences > Behavior > Snapping > "only snap the node closest to the pointer"
is turned off,
turn on cusp node snapping via the button on the snapping toolbar,

create a rectangle,
draw a diagonal path between two opposite corners of the rectangle,
  it also seams to happen when a circle is drawn from corner to corner over the rectangle (the second image below),
select both the rectangle and path,
start scaling from one of the corner scale handles,
while holding down the mouse button on a scaling handle and moving the mouse the onscreen snap message says "Corner to UNDEFINED"

http://i.imgur.com/5LG3m5D.png

and when one stops moving the mouse it changes to "UNDEFINED to UNDEFINED".

http://i.imgur.com/2k7qlOL.png

Tested with:
inkscape_0.49~devel+12830+12~ubuntu12.10.1_i386.deb
on linux mint 15 cinnamon 32bit

Cojnel (cojnel)
tags: added: ui
su_v (suv-lp)
tags: added: snapping
Revision history for this message
su_v (suv-lp) wrote :

Not reproduced with Inkscape 0.48.4 on OS X 10.7.5,
reproduced with current trunk r12832.

All archived builds on this laptop (oldest tested revision: 10795) expose these kind of snap messages.

Changed in inkscape:
importance: Undecided → Low
milestone: none → 0.49
status: New → Triaged
tags: added: regression
Bryce Harrington (bryce)
description: updated
Changed in inkscape:
assignee: nobody → Bryce Harrington (bryce)
Revision history for this message
Bryce Harrington (bryce) wrote :

Looks like the code wasn't checking that the source and/or target were undefined before generating the tooltip message. I've conditionalized the tooltip to check now.

Changed in inkscape:
status: Triaged → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

New compiler warning with rev >= 12883:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12883>

../../src/display/snap-indicator.cpp:265:69: warning: comparison of two values with different enumeration types ('Inkscape::SnapTargetType' and 'Inkscape::SnapSourceType') [-Wenum-compare]
        if (p.getSource() != SNAPSOURCE_GRID_PITCH && p.getTarget() != SNAPSOURCE_UNDEFINED) {
                                                      ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Revision history for this message
su_v (suv-lp) wrote :

On 2014-01-06 23:16 +0100, ~suv wrote:
> New compiler warning with rev >= 12883

Warning addressed by Johan Engelen in r12888.

Revision history for this message
Kris (kris-degussem) wrote :

Re comment 3: warning fixed by Johan Engelen in trunk r 12888

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Bryce's commit suppresses the "undefined" the snap indicator label, which is indeed good from a user perspective I guess. To make sure that such a bug doesn't go unnoticed though, Inkscape now spits outs console messages in such a case, so at least one of the devs will notice. It's not easily noticed otherwise if such a bug is present (one would have to notice that no snap indicator is shown)

On top of that, I've fixed the real underlying issue in rev. 13361. Some error tolerances in snap.cpp needed to be adjusted. Inkscape shouldn't even have tried to snap in this case, but it did nevertheless and showed an "undefined" label.

Changed in inkscape:
assignee: Bryce Harrington (bryce) → Diederik van Lierop (mail-diedenrezi)
Revision history for this message
su_v (suv-lp) wrote :

@Diederik - with latest trunk builds (rev >= 13361) there are a lot of console messages produced with most basic scaling operations (single object, no snapping involved). Is this expected, and really of interest to the developers as indicator of a bug?

Steps to reproduce:
1) move aside existing prefs
2) launch current trunk (default prefs, default new doc based on default, non-localized template)
3) draw a rectangle
4) scale it with the mouse by dragging one of the scale arrows

Console output:
0 | 0
0 | 0
0 | 0
0 | 0
0 | 0
0 | 0

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Yeah, that was me. I'll fix this!

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

The debugging output has been removed as of rev. #13379. Thanks for notifying me ~suv!

Bryce Harrington (bryce)
Changed in inkscape:
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.