"Fit page to selection" does not adjust grid origins

Bug #240689 reported by Thomas ten Cate
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Johan Engelen

Bug Description

When clicking "Fit page to selection" in the Document Properties dialog, the origin of grids is kept the same, but it is now relative to the *new* page boundaries. This causes grids to move relative to the geometry in my drawing, and everything that was previously aligned to a grid is no longer aligned to it.

I would expect the origins of grids to be adjusted accordingly, so that the origin of grids remains the same relative to the geometry, not relative to the page border.

Tags: grids

Related branches

Revision history for this message
Blair Bonnett (bcb) wrote :

Confirmed in SVN revision 19033 under Fedora 8. Note that it affects page size changes in general, not just the fit page option.

Blair Bonnett (bcb)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Blair Bonnett (bcb) wrote :

Workaround that did the trick for my situation:

I'm drawing a series of block diagrams and circuit diagrams. These are all drawn on a 2mm grid, and the borders/lines are all 1mm thick. This means that the edges of the lines - which the 'Fit page to selection' button maps the edge of the page to - are 0.5mm either side of the grid line. Hence this resize moves the nodes of the line off-grid; see the top half of the attached image to see this.

If I set the grid offset to 0.5mm in both directions, this offset stays the same after the resize. Now when the page is fit, the offset means that the nodes are still on the grid as shown in the lower half of the attached image.

This workaround will only work if the bottom- and left-most lines (i.e. the ones which the bottom-left corner is mapped to in a page fit) are the same size.

Revision history for this message
pRototype (regeir) wrote :

The problem still persists in Inkscape 0.47+devel r9369

Main window. A square is the only object. It fits on the major grids.
http://s29.photobucket.com/albums/c297/Mannegrisen/Shovis/?action=view&current=Inkscape1.png

Settings. Here I resize to fit, with defined margins.
http://i29.photobucket.com/albums/c297/Mannegrisen/Shovis/Inkscape2_properties.png

Upper left corner doesn't fit major grids any more
http://i29.photobucket.com/albums/c297/Mannegrisen/Shovis/Inkscape3a.png

Lower left corner doesn't fit major grids any more
http://i29.photobucket.com/albums/c297/Mannegrisen/Shovis/Inkscape3b.png

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

@pRototype - use the geometric bounding box mode if you need the selection for 'Resize Content to...' be relative to the nodes and not the visual bounding box (which includes the stroke).

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

oops - sorry, I'm mistaken, it appears that the command doesn't respect the chosen bounding box mode either.

su_v (suv-lp)
tags: added: grids
Revision history for this message
Philip Pirrip (pip-net) wrote :

This issue is even worse for me when I put *guides* on some nice/integer/calculated positions and use "Fit page to selection". I'd suggest having an option of cropping the page but leaving the positions of the guides on the same values, what in essence will move the rules (the page will not start at 0,0), and leave the coordinates of all the objects at the old values.
The rules are only important to me if I want to have a definite size of the page, but when making images that I want to include somewhere, and resize them to whatever size, I'm only interested in relative coordinates.

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

Philip Pirrip: please open a new bug report with your exact wish. (it is somewhat orthogonal to this bug report)

Just fixed this. The origins of the grids are now translated, like is done for guides.

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
milestone: none → 0.48.3
status: Confirmed → Fix Committed
Ted Gould (ted)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.