diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-02-23 23:55:35 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-02-23 23:55:35 +0000 |
| commit | 3188b55dce3d9e82aacb9088622aa762d836d18b (patch) | |
| tree | 5e2b6a37db48a55bfa6b5f1dd1c4f0874836ea14 /src/ui/dialog | |
| parent | update to trunk (diff) | |
| parent | Fix for selcue settings. (diff) | |
| download | inkscape-3188b55dce3d9e82aacb9088622aa762d836d18b.tar.gz inkscape-3188b55dce3d9e82aacb9088622aa762d836d18b.zip | |
update to trunk
(bzr r11950.1.255)
Diffstat (limited to 'src/ui/dialog')
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/symbols.cpp | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index d344fb1d6..0411c789c 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -1734,8 +1734,14 @@ void DocumentProperties::onDocUnitChange() prefs->setBool("/options/transform/gradient", true); { ShapeEditor::blockSetItem(true); + gdouble viewscale = doc->getWidth().value("px")/doc->getRoot()->viewBox.width(); + if (doc->getHeight().value("px")/doc->getRoot()->viewBox.height() < viewscale) + viewscale = doc->getHeight().value("px")/doc->getRoot()->viewBox.height(); gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit); - doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(0, doc->getHeight().value("px"))); + doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(-viewscale*doc->getRoot()->viewBox.min()[Geom::X] + + (doc->getWidth().value("px") - viewscale*doc->getRoot()->viewBox.width())/2, + viewscale*doc->getRoot()->viewBox.min()[Geom::Y] + + (doc->getHeight().value("px") + viewscale*doc->getRoot()->viewBox.height())/2)); ShapeEditor::blockSetItem(false); } prefs->setBool("/options/transform/stroke", transform_stroke); diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp index 98754fb4f..62a2f8572 100644 --- a/src/ui/dialog/symbols.cpp +++ b/src/ui/dialog/symbols.cpp @@ -381,8 +381,10 @@ void SymbolsDialog::selectionChanged(Inkscape::Selection *selection) { } } -void SymbolsDialog::documentReplaced(SPDesktop */*desktop*/, SPDocument */*document*/) +void SymbolsDialog::documentReplaced(SPDesktop *desktop, SPDocument *document) { + currentDesktop = desktop; + currentDocument = document; rebuild(); } |
