diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-12-02 18:39:33 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-12-02 18:39:33 +0000 |
| commit | 09e2f7b62d13537a0f006fc9953c533802fd9c12 (patch) | |
| tree | 78c1a72538f0e60e38c3ca1845a909fcad53f394 /src/ui/widget/page-sizer.cpp | |
| parent | adding fussion improvements (diff) | |
| parent | Extensions. Fix for Bug #1192746 (e key does not start export on firefox [Jes... (diff) | |
| download | inkscape-09e2f7b62d13537a0f006fc9953c533802fd9c12.tar.gz inkscape-09e2f7b62d13537a0f006fc9953c533802fd9c12.zip | |
update to trunk
(bzr r13708.1.4)
Diffstat (limited to 'src/ui/widget/page-sizer.cpp')
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 89b0b8f7e..df464fbb0 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -311,10 +311,10 @@ PageSizer::PageSizer(Registry & _wr) SPDesktop *dt = SP_ACTIVE_DESKTOP; SPNamedView *nv = sp_desktop_namedview(dt); _wr.setUpdating (true); - if (nv->units) { - _dimensionUnits.setUnit(nv->units->abbr); - } else if (nv->doc_units) { - _dimensionUnits.setUnit(nv->doc_units->abbr); + if (nv->page_size_units) { + _dimensionUnits.setUnit(nv->page_size_units->abbr); + } else if (nv->display_units) { + _dimensionUnits.setUnit(nv->display_units->abbr); } _wr.setUpdating (false); @@ -459,7 +459,7 @@ PageSizer::init () * \param changeList whether to modify the paper size list */ void -PageSizer::setDim (Inkscape::Util::Quantity w, Inkscape::Util::Quantity h, bool changeList) +PageSizer::setDim (Inkscape::Util::Quantity w, Inkscape::Util::Quantity h, bool changeList, bool changeSize) { static bool _called = false; if (_called) { @@ -479,8 +479,8 @@ PageSizer::setDim (Inkscape::Util::Quantity w, Inkscape::Util::Quantity h, bool if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) { SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP); Inkscape::Util::Quantity const old_height = doc->getHeight(); - doc->setWidth (w); - doc->setHeight (h); + doc->setWidth (w, changeSize); + doc->setHeight (h, changeSize); // The origin for the user is in the lower left corner; this point should remain stationary when // changing the page size. The SVG's origin however is in the upper left corner, so we must compensate for this Geom::Translate const vert_offset(Geom::Point(0, (old_height.value("px") - h.value("px")))); @@ -717,7 +717,8 @@ PageSizer::on_units_changed() if (_widgetRegistry->isUpdating()) return; _unit = _dimensionUnits.getUnit()->abbr; setDim (Inkscape::Util::Quantity(_dimensionWidth.getValue(""), _dimensionUnits.getUnit()), - Inkscape::Util::Quantity(_dimensionHeight.getValue(""), _dimensionUnits.getUnit())); + Inkscape::Util::Quantity(_dimensionHeight.getValue(""), _dimensionUnits.getUnit()), + true, false); } } // namespace Widget |
