summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/document-properties.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-09-25 22:56:32 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-09-25 22:56:32 +0000
commit86c5f57796d973a949bf784a2a3decd451670f65 (patch)
tree67ebaebe16b973bbec7bc3b5501dbfcd63477c8c /src/ui/dialog/document-properties.cpp
parentupdate to trunk (diff)
parentC++ify calling a few SPLPEItem functions, much more work than expected... slo... (diff)
downloadinkscape-86c5f57796d973a949bf784a2a3decd451670f65.tar.gz
inkscape-86c5f57796d973a949bf784a2a3decd451670f65.zip
Update to trunk
(bzr r11950.1.148)
Diffstat (limited to 'src/ui/dialog/document-properties.cpp')
-rw-r--r--src/ui/dialog/document-properties.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index ec04f6d98..37d0ce213 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1440,15 +1440,21 @@ void DocumentProperties::update()
if (nv->doc_units)
_rum_deflt.setUnit (nv->doc_units->abbr);
- double const doc_w = sp_desktop_document(dt)->getRoot()->width.value;
+ double doc_w = sp_desktop_document(dt)->getRoot()->width.value;
Glib::ustring doc_w_unit = unit_table.getUnit(sp_desktop_document(dt)->getRoot()->width.unit).abbr;
if (doc_w_unit == "") {
doc_w_unit = "px";
+ } else if (doc_w_unit == "%" && sp_desktop_document(dt)->getRoot()->viewBox_set) {
+ doc_w_unit = "px";
+ doc_w = sp_desktop_document(dt)->getRoot()->viewBox.width();
}
- double const doc_h = sp_desktop_document(dt)->getRoot()->height.value;
+ double doc_h = sp_desktop_document(dt)->getRoot()->height.value;
Glib::ustring doc_h_unit = unit_table.getUnit(sp_desktop_document(dt)->getRoot()->height.unit).abbr;
if (doc_h_unit == "") {
doc_h_unit = "px";
+ } else if (doc_h_unit == "%" && sp_desktop_document(dt)->getRoot()->viewBox_set) {
+ doc_h_unit = "px";
+ doc_h = sp_desktop_document(dt)->getRoot()->viewBox.height();
}
_page_sizer.setDim(Inkscape::Util::Quantity(doc_w, doc_w_unit), Inkscape::Util::Quantity(doc_h, doc_h_unit));
_page_sizer.updateFitMarginsUI(nv->getRepr());