summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-02-19 10:48:41 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-02-19 10:48:41 +0000
commitf15ac06ffd9cc8dbb098b18a6b273b32fc904fc9 (patch)
tree482bc967d7e637d3f8817aa2074362a461465603 /src/ui/dialog
parentupdate to trunk (diff)
parentAdd SVG2 property 'paint-order'. (diff)
downloadinkscape-f15ac06ffd9cc8dbb098b18a6b273b32fc904fc9.tar.gz
inkscape-f15ac06ffd9cc8dbb098b18a6b273b32fc904fc9.zip
update to trunk
(bzr r11950.1.254)
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/document-properties.cpp11
-rw-r--r--src/ui/dialog/ocaldialogs.cpp5
2 files changed, 10 insertions, 6 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index d324d2d1b..d344fb1d6 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1703,9 +1703,14 @@ void DocumentProperties::onDocUnitChange()
repr->setAttribute("inkscape:document-units", os.str().c_str());
// Set viewBox
- Inkscape::Util::Quantity width = doc->getWidth();
- Inkscape::Util::Quantity height = doc->getHeight();
- doc->setViewBox(Geom::Rect::from_xywh(0, 0, width.value(doc_unit), height.value(doc_unit)));
+ if (doc->getRoot()->viewBox_set) {
+ gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit);
+ doc->setViewBox(doc->getRoot()->viewBox*Geom::Scale(scale));
+ } else {
+ Inkscape::Util::Quantity width = doc->getWidth();
+ Inkscape::Util::Quantity height = doc->getHeight();
+ doc->setViewBox(Geom::Rect::from_xywh(0, 0, width.value(doc_unit), height.value(doc_unit)));
+ }
// TODO: Fix bug in nodes tool instead of switching away from it
if (tools_active(getDesktop()) == TOOLS_NODES) {
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index 93fcab863..f676e75fd 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -1166,8 +1166,6 @@ void ImportDialog::on_xml_file_read(const Glib::RefPtr<Gio::AsyncResult>& result
// free the document
xmlFreeDoc(doc);
- // free the global variables that may have been allocated by the parser
- xmlCleanupParser();
}
@@ -1336,7 +1334,8 @@ ImportDialog::ImportDialog(Gtk::Window& parent_window, FileDialogType file_types
*/
ImportDialog::~ImportDialog()
{
-
+ // free the global variables that may have been allocated by the parser
+ xmlCleanupParser();
}
/**