diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
| commit | 5a4fb2325f60d292b47330f540b26a3279341c90 (patch) | |
| tree | d2aa7967be25450b83e625025366c618101ae49f /src/svg-view.cpp | |
| parent | The Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff) | |
| parent | Remove Snap menu item and improve grid menu item text (diff) | |
| download | inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip | |
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/svg-view.cpp')
| -rw-r--r-- | src/svg-view.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/svg-view.cpp b/src/svg-view.cpp index 7559cbb24..f52608420 100644 --- a/src/svg-view.cpp +++ b/src/svg-view.cpp @@ -20,6 +20,7 @@ #include "sp-item.h" #include "svg-view.h" #include "sp-root.h" +#include "util/units.h" SPSVGView::SPSVGView(SPCanvasGroup *parent) { @@ -71,16 +72,16 @@ void SPSVGView::doRescale(bool event) if (!doc()) { return; } - if (doc()->getWidth () < 1e-9) { + if (doc()->getWidth().value("px") < 1e-9) { return; } - if (doc()->getHeight () < 1e-9) { + if (doc()->getHeight().value("px") < 1e-9) { return; } if (_rescale) { - _hscale = _width / doc()->getWidth (); - _vscale = _height / doc()->getHeight (); + _hscale = _width / doc()->getWidth().value("px"); + _vscale = _height / doc()->getHeight().value("px"); if (_keepaspect) { if (_hscale > _vscale) { _hscale = _vscale; @@ -95,8 +96,8 @@ void SPSVGView::doRescale(bool event) } if (event) { - emitResized (doc()->getWidth () * _hscale, - doc()->getHeight () * _vscale); + emitResized (doc()->getWidth().value("px") * _hscale, + doc()->getHeight().value("px") * _vscale); } } |
