On 10/15/05, bulia byak <buliabyak@...400...> wrote:
On 10/15/05, Ben Fowler <ben.the.mole@...400...> wrote:
- Missing images should not be selectable and/or ..
[Good stuff snipped]
That is exactly what I was thinking when I posted.
Personally, I think that there there is going to be a bit of a surprise: we open the file and zoom to selection expecting a zoom of around 66% and actually get 1%. Once zoomed out, the canvas looks funny and it is a fiddle to get back.
I am not sure how to deal with this.
The SPItem object has an 'isHidden' property, rather than an 'isVisible' one.
desktop.cpp around line 818 calls selection->bounds(&d); to get the bounds of the selection, and selection.cpp around line 307 iterates through the list of items.
Assuming that in general we cannot expect Inkscape to determine whether or not a bounding box is insane, I was thinking that we might exclude some items from the bbox estimation to make the behaviour less surprising.
If this is too intrusive (it would need a change to SPItem, I think), then another possibility would be to document 'zoom to selection' as never zooming out beyond 'fit to page' or 'fit to page width'. If someone is editing files with objects bigger than this (he or she probably couldn't print the file to his or her satisfaction anyway), and needed to zoom out further, then he or she would have to use the zoom tool. I don't think that this would be a big surprise (or a big burden, or needed often), but there is obviously room for several opinions there.
It is a cop out, but there coiuld be a preference: Limit automated zoom out to Page vs Always zoom all the way.
Adding a preference is nearly always wrong and I don't like this one, and whilst the 'iron is hot' we should put in a correct solution.
What do other apps do?
As I said, Freehand can be persuaded to zoom out further than I think it should.
Note that the method Selection::boundsInDocument (selection.cpp around line 326 is never called so far as I can tell and should be slated for removal.
Ben