Grid settings not respected when reopening document

Bug #172778 reported by JiHO
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Johan Engelen

Bug Description

Settings regarding grid spacing are not respected when reopening documents:
- on old documents (before the new grid code with axonometric gris and all) the grid is always shown even if it was hidden in the document previously
- on new documents, the unit is always set back to px and x grid spacing is always set back to 1px.

In addition, some old grid settings are still present:
     showgrid="false"
     gridspacingx="2mm"
     gridspacingy="2mm"
along side the new ones:
    <inkscape:grid
       type="xygrid"
       id="grid6859"
       originx="0px"
       originy="0px"
       spacingx="1px"
       spacingy="1px"
       units="px"
       empspacing="5" />
but are not kept in sync. Either they need to be removed or they need to be kept in sync to ensure compatibility with older versions (the first choice would be OK for me, Inkscape is free and <1.0 so it's not difficult to upgrade and there's a tacit understanding that things are still likely to change).

Tested on r16565 but the bug has been present for a few revisions (at least since 16527).

Revision history for this message
JiHO (jiho) wrote :
Changed in inkscape:
importance: Undecided → High
milestone: none → 0.46
Revision history for this message
JiHO (jiho) wrote :

Does not occur with older rev 16467.

hash (hash-g)
Changed in inkscape:
status: New → Incomplete
Revision history for this message
JiHO (jiho) wrote : Re: [Bug 172778] Re: Grid settings not respected when reopening document

On 2007-December-08 , at 14:42 , hash wrote:
> ** Changed in: inkscape
> Status: New => Incomplete

What's incomplete about the bug description?

JiHO
---
http://jo.irisson.free.fr/

Revision history for this message
hash (hash-g) wrote :

Needed to see myself, the most recent win32 build Inkscape0712071739, has it too.

Changed in inkscape:
status: Incomplete → Confirmed
Revision history for this message
Johan Engelen (johanengelen) wrote :

After quite some work, fixed in svn rev. 16863
It reads the old grid settings strings, and puts them in a new-style XY grid definition. Not tested extensively.

Changed in inkscape:
assignee: nobody → johanengelen
status: Confirmed → Fix Released
Revision history for this message
nightrow (jb-benoit) wrote :

I'm sorry to say i still have this behavior on last SVN Inkscape0801160334.7z.
I set a 10*10 grid and when i reopen the document the grid is 0*0.
Can't join document because i can't publish it but i'll try to make a demonstration one later today.

Changed in inkscape:
status: Fix Released → Confirmed
Revision history for this message
Johan Engelen (johanengelen) wrote :

This was actually a different bug, concerning pre0.46 inkscape files. But it has already been fixed. Can you test again? Set to fixed if so.

 It was caused because of recoding the widgets (RegisteredWidget to RegisteredWidget<E>), but I just fixed it.

Changed in inkscape:
status: Confirmed → Incomplete
Changed in inkscape:
status: Incomplete → Fix Released
Revision history for this message
nightrow (jb-benoit) wrote :

I confirm that i don't have this bug anymore on the 0.46pre0 version with my
bugguy file.
This is thus indeed solved for me.

On Jan 23, 2008 5:59 PM, Johan Engelen <email address hidden> wrote:

> ** Changed in: inkscape
> Status: Incomplete => Fix Released
>
> --
> Grid settings not respected when reopening document
> https://bugs.launchpad.net/bugs/172778
> 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
Mike Kowalski (mike-kov) wrote :

I use a nightly build (Jan 28, 2008) and there's still a problem with restoring grid lines transparency. If I open a doc with grid transparency different than defined in a default template, those settings will only be used after opening document properties dialog box.

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

Reopening as per user comment

Changed in inkscape:
status: Fix Released → Confirmed
Revision history for this message
Mike Kowalski (mike-kov) wrote :

I tried hard to reproduce this problem again to provide exact steps, and I couldn't.
When I encountered it for the first time, I opened document properties, clicked on a checked "Visible" checkbox in a grid tab, and blue grid lines turned lighter. I don't know if was the effect of redrawing grid lines in document settings (reduced opacity), or drawing them just once (can they be drawn twice by mistake?).
At any rate, I encountered different problem with "Show grid" command having no effect on grid visibility.
Let me know which source file to scrutinize, I suspect something's still not quite right...

Revision history for this message
Johan Engelen (johanengelen) wrote :

I am also experiencing buggy behavior, but do not know the exact steps to reproduce.
Often it gets 'fixed' when opening the document properties dialog.

> Let me know which source file to scrutinize, I suspect
> something's still not quite right...

Related files:
- src/display/canvas-grid.cpp
this *should* do all loading of XY grid variables from svg, and initialize the grid accordingly)

- src/ui/dialogs/document-properties.cpp
(this apparantly triggers some reloading or initialization of grid variables...)

- src/sp-namedview.cpp
The function 'sp_namedview_generate_old_grid' reads old 0.45 grid values and generates a new grid from them. It deletes the old values afterwards. Don't think this file matters.

Thanks for looking into this.

Revision history for this message
David Császár (p5) wrote :

can reproduce this with Inkscape 0.45.1+0.46pre1+devel, built Feb 1 2008 and the attached file. (on win xp)
1. save the file
2. click it
->wrong grid (dark blue)
3. select file->document settings
->correct grid (light blue & light red)

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

Same here:
1) starting inkscape
2) opening a document with a grid, using "Open recent"
3) the default grid is being displayed, not the grid as set in the document
4) after opening the document properties dialog: the correct grid parameters are being loaded and the grid is updated

Revision history for this message
Johan Engelen (johanengelen) wrote :

working on it (waiting for build). simple bug :) indeed the actual parameters were read during widget creation, instead of during grid creation... d0h!

Changed in inkscape:
status: Confirmed → In Progress
Changed in inkscape:
status: In Progress → 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.