diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-02-25 17:29:16 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-02-25 17:29:16 +0000 |
| commit | e84ae2ae2b7035f2dd7ae0bfb026f80ff8bc8f87 (patch) | |
| tree | 7bfc20c5f22bb0120ebde7c81bc4410aca0dace4 /src/ui/dialog | |
| parent | Not finished by improved data uri support (diff) | |
| parent | Fix infinite loop (?) by disabling saving the order of filters when they are ... (diff) | |
| download | inkscape-e84ae2ae2b7035f2dd7ae0bfb026f80ff8bc8f87.tar.gz inkscape-e84ae2ae2b7035f2dd7ae0bfb026f80ff8bc8f87.zip | |
Merge from trunk
(bzr r13047.1.3)
Diffstat (limited to 'src/ui/dialog')
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 7 | ||||
| -rw-r--r-- | src/ui/dialog/symbols.cpp | 4 |
3 files changed, 16 insertions, 3 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/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 6a3a4c3f1..e8b09db8b 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1515,11 +1515,16 @@ void FilterEffectsDialog::FilterModifier::on_name_edited(const Glib::ustring& pa } void FilterEffectsDialog::FilterModifier::on_filter_reorder(const Gtk::TreeModel::Path& /*path*/) { +/* The code below is bugged. Use of "object->getRepr()->setPosition(0)" is dangerous! + Writing back the reordered list to XML (reordering XML nodes) should be implemented differently. + Note that the dialog does also not update its list of filters when the order is manually changed + using the XML dialog for(Gtk::TreeModel::iterator i = _model->children().begin(); i != _model->children().end(); ++i) { SPObject* object = (*i)[_columns.filter]; - if(object && object->getRepr()) + if(object && object->getRepr()) ; object->getRepr()->setPosition(0); } +*/ } void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustring& path) 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(); } |
