diff options
| author | Stefano Facchini <stefano.facchini@gmail.com> | 2017-10-01 13:27:03 +0000 |
|---|---|---|
| committer | Stefano Facchini <stefano.facchini@gmail.com> | 2017-10-01 13:40:38 +0000 |
| commit | d4432a4aaf3fb615d9808f53557a4283436bf035 (patch) | |
| tree | 2a9cc5ae46c673d092abdaba399133659f0cfc27 /src/ui/shape-editor.cpp | |
| parent | A little styling tweak to a LPE expander (diff) | |
| download | inkscape-d4432a4aaf3fb615d9808f53557a4283436bf035.tar.gz inkscape-d4432a4aaf3fb615d9808f53557a4283436bf035.zip | |
Fix the editing of clipping and masking objects
By passing along an edit_transform matrix, as done for clipping paths.
Cleanups:
- remove some unused methods
- use member initialization
Diffstat (limited to 'src/ui/shape-editor.cpp')
| -rw-r--r-- | src/ui/shape-editor.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/ui/shape-editor.cpp b/src/ui/shape-editor.cpp index 6a8f5e931..2c0e662ee 100644 --- a/src/ui/shape-editor.cpp +++ b/src/ui/shape-editor.cpp @@ -31,10 +31,12 @@ namespace UI { bool ShapeEditor::_blockSetItem = false; -ShapeEditor::ShapeEditor(SPDesktop *dt) { - this->desktop = dt; - this->knotholder = NULL; - this->knotholder_listener_attached_for = NULL; +ShapeEditor::ShapeEditor(SPDesktop *dt, Geom::Affine edit_transform) : + desktop(dt), + knotholder(nullptr), + knotholder_listener_attached_for(nullptr), + _edit_transform(edit_transform) +{ } ShapeEditor::~ShapeEditor() { @@ -76,14 +78,6 @@ void ShapeEditor::decrement_local_change() { } } -const SPItem *ShapeEditor::get_item() { - const SPItem *item = NULL; - if (this->has_knotholder()) { - item = this->knotholder->getItem(); - } - return item; -} - void ShapeEditor::event_attr_changed(Inkscape::XML::Node * node, gchar const *name, gchar const *, gchar const *, bool, void *data) { g_assert(data); @@ -129,6 +123,7 @@ void ShapeEditor::set_item(SPItem *item, bool keep_knotholder) { this->knotholder = createKnotHolder(item, desktop); } if (this->knotholder) { + this->knotholder->setEditTransform(_edit_transform); this->knotholder->update_knots(); // setting new listener repr = this->knotholder->repr; |
