Setting grid origin has no effect

Bug #561503 reported by Hynek Mlnarik on 2010-04-12
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Low
zcgucas

Bug Description

I'm using Inkscape 0.47, Windows build, Czech locale.

I'm trying to set up a rectangular grid. My document is measured in pixels, and the grid should be every 1 pixel both in X and Y dimensions. This works, however trying to set the grid origin to be set to (0.5, 0.5) does not, the grid origin remains set to (0,0). Setting the origin to (1.5, 1.5) works correctly, though.

This seems to be a bug to me. Maybe locale is the issue as in Czech localization? We use comma (,) instead of dot (.) as the decimal point, ie. Czech "0,5" is the same as English "0.5", see attached grid definition.

Hynek Mlnarik (hmlnarik) wrote :
su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 and 0.47+devel r9319 on OS X 10.5.8

with both
  LANG=en_US.UTF-8 (decimal point '.')
  LANG=de_DE.UTF-8 (decimal point ',')

The bug is not related to the size of the origin offset: only the second time a number is entered into the same origin offset field it is picked up and used in the document i.e. the first offset value entered in a new or previously unedited grid (confirmed with <Enter>, <Return> or <TAB>) it is ignored. This can be verified with the XML Editor - the value for the origin offset is live-updated on change. This error is not noticeable when using the spinbutton arrows or the scroll wheel to adjust the value.

AFAICS this bug is not triggered by or limited to certain locale setting.

Workaround: if you enter the value with the keyboard, adjust it one step up and back down using the spinbox arrows (or the mouse wheel) or enter a second (different) value.

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
tags: added: grids ui
Chris Morgan (chris.morgan) wrote :

Looks like some sort of event-handling bug to me. It's happening as reported to me too (r9152, Ubuntu 9.10, English). I worked out the workaround too, and also discovered the other spinbox actions work too, using the arrow keys updates it too, so now I just press the Up then the Down arrows and it updates.

It's a minor annoyance but I think it's probably just a single line of missing or incorrect code.

su_v (suv-lp) on 2011-01-26
Changed in inkscape:
status: Confirmed → Triaged
su_v (suv-lp) on 2011-11-05
tags: added: easy-fix
zcgucas (zcgucas) wrote :

A method to fix this bug.

Johan Engelen (johanengelen) wrote :

Thank you very much for your patch!
I've applied the fix in rev 11133

Changed in inkscape:
assignee: nobody → zcgucas (zcgucas)
milestone: none → 0.49
status: Triaged → Fix Committed
su_v (suv-lp) on 2012-12-17
tags: removed: easy-fix
vaifrax (vaifrax) wrote :

umm, I just stumbled over this, the patch contains the lines:

    _rsu_sx->clearProgrammatically();
    _rsu_sx->clearProgrammatically();

but this should probably be:

    _rsu_sx->clearProgrammatically();
    _rsu_sy->clearProgrammatically();

This should affect the vertical spacing of the grids not behaving correctly, however for me it works anyway.

the current code in canvas-grid.cpp looks like this:
    _rsu_sx->setProgrammatically = false;
    _rsu_sx->setProgrammatically = false;

su_v (suv-lp) wrote :

@vaifrax - thanks! Fix from comment #6 confirmed, tested and committed in r12128:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12128>

su_v (suv-lp) wrote :

The changes from r11133 and r12128 merge cleanly into <lp:inkscape/0.48.x>, and fix the reported problem as expected: the attached patch (include changes from both revisions) was tested successfully with 0.48.x r9963 on OS X 10.7.5.

Proposing to include the fix in 0.48.5.

tags: added: backport-proposed
jazzynico (jazzynico) wrote :

Backport patch tested successfully on Windows XP, 0.48.x branch revision 9663.

su_v (suv-lp) wrote :

Backport committed to lp:inkscape/0.48.x in revision 9967

Changed in inkscape:
milestone: 0.49 → 0.48.5
Kris (kris-degussem) on 2013-12-11
tags: removed: backport-proposed
Changed in inkscape:
status: Fix Committed → Fix Released
Max A. Lupton (maxj) wrote :

This still does not work as of Inkscape 0.48.4 r9939
Neither X nor Y grid origins respond to entries or spinbox arrows
The workaround mentioned above does not work either.

This is the Windows build using a stock Windows 7 x64 install using the default locale (US)

su_v (suv-lp) wrote :

On 2014-07-04 16:31 +0100, Max A. Lupton wrote:
> This still does not work as of Inkscape 0.48.4 r9939

To be expected - please check the milestone of the bug report: the fix is in 0.48.5, not in 0.48.4. You can download latest bug-fix release 0.48.5 from inkscape.org.

su_v (suv-lp) wrote :

On 2014-07-04 16:31 +0100, Max A. Lupton wrote:
> The workaround mentioned above does not work either.

… or possibly your comment is actually a question about usage (beyond the scope of the bug tracker), and not about the issue tracked in this report (the workarounds for the UI bug tracked in this report do work in Inkscape 0.48.4). Note that the grid origin has no effect on the rulers (the origin of the rulers is fixed at the bottom left corner of the page area for now).

houz (houz) wrote :

This bug is also in the GUI for axonometric grids. Tested with current trunk.

su_v (suv-lp) wrote :

@houz - would you mind filing a new report for the related issue with the GUI settings of axonometric grids?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers