Comment 4 for bug 1235279

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

To fix this bug, hints:

document.cpp, SPDocument::setWidth, line 589: " root->viewBox.setMax(Geom::Point(root->viewBox.left() + (root->width.computed / old_computed) * root->viewBox.width(), root->viewBox.bottom()));"
Similarly for SPDocument::setHeight.
That strikes me as way too much calculation. It should read something like root->viewBox.left() + new_width. Why is this calculation there at all? (taking the old value into account doesn't make sense to me)

default.svg contains
      width="744.09448819"
      height="1052.3622047">"
A lot of digits! Then in the XML reader it says:
     width = 744.09448
     height = 1052.3622
  (also for viewbox attribute)
But the Document Properties dialog says:
   width = 744.09448 (same, hence no rounding errors in updating the document width?)'
  height = 1052.36218 (note the difference!)