This is a bug that has annoyed me a few too many times, so I'll probably have a look at the code to see what I can do. My previous workaround (before I was aware this was a viewbox issue) was the following:
1) Group the selection
2) making a duplicate of the selection
3) cut the duplicate
4) select the original, fit page to selection
5) delete the original, paste the duplicate
Now that I'm aware it's a viewbox issue, the following seems as if it may also work:
1) Remove viewbox attribute
2) fit page to selection
The current behaviour regarding the viewbox seems odd, and I may not have the proper grasp of it, but I'll plod along anyway...
The preferred behaviour for me would be for 'fit page to selection' to fit the apparent page to the selection, rather than resizing the page based on what width the selection is in the context of the viewbox. Let's say the page is (apparently) 'p' units wide, the selection is 's' units wide, and the viewbox has width 'v'. I see three options to do this:
A) change the viewbox width to s/p and the page width to s/p
B) change the *selection* width to p/s
C) remove the viewbox, then change the page width to s/p
Compare this with what seems to be the current behaviour:
D) change the page width to s/p, without modifying the viewbox width
As the user has requested fit *page* to selection, rather than fit selection to page, option A seems like the only reasonable thing to do in this case -- I'm going to assume that the user wants to keep the viewbox.
This is a bug that has annoyed me a few too many times, so I'll probably have a look at the code to see what I can do. My previous workaround (before I was aware this was a viewbox issue) was the following:
1) Group the selection
2) making a duplicate of the selection
3) cut the duplicate
4) select the original, fit page to selection
5) delete the original, paste the duplicate
Now that I'm aware it's a viewbox issue, the following seems as if it may also work:
1) Remove viewbox attribute
2) fit page to selection
The current behaviour regarding the viewbox seems odd, and I may not have the proper grasp of it, but I'll plod along anyway...
The preferred behaviour for me would be for 'fit page to selection' to fit the apparent page to the selection, rather than resizing the page based on what width the selection is in the context of the viewbox. Let's say the page is (apparently) 'p' units wide, the selection is 's' units wide, and the viewbox has width 'v'. I see three options to do this:
A) change the viewbox width to s/p and the page width to s/p
B) change the *selection* width to p/s
C) remove the viewbox, then change the page width to s/p
Compare this with what seems to be the current behaviour:
D) change the page width to s/p, without modifying the viewbox width
As the user has requested fit *page* to selection, rather than fit selection to page, option A seems like the only reasonable thing to do in this case -- I'm going to assume that the user wants to keep the viewbox.