diff options
| author | Martin Owens <doctormo@gmail.com> | 2019-03-20 18:07:04 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2019-03-20 18:07:04 +0000 |
| commit | 3248c4cf747dc0c3e733c062375ae97b2a4e9e47 (patch) | |
| tree | 8d2802ee94cff4590f179da7214e098e7095c3be /src/xml/composite-node-observer.cpp | |
| parent | Disable GTK3's motion event compression which was making drawing lag. (diff) | |
| parent | Add explicit overrides (diff) | |
| download | inkscape-3248c4cf747dc0c3e733c062375ae97b2a4e9e47.tar.gz inkscape-3248c4cf747dc0c3e733c062375ae97b2a4e9e47.zip | |
Fix #116: Wrong element names shown in XML editor for circles and ellipses
Diffstat (limited to 'src/xml/composite-node-observer.cpp')
| -rw-r--r-- | src/xml/composite-node-observer.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xml/composite-node-observer.cpp b/src/xml/composite-node-observer.cpp index 1f9c08681..77a1bd2fd 100644 --- a/src/xml/composite-node-observer.cpp +++ b/src/xml/composite-node-observer.cpp @@ -101,6 +101,17 @@ void CompositeNodeObserver::notifyAttributeChanged( _finishIteration(); } +void CompositeNodeObserver::notifyElementNameChanged(Node& node, GQuark old_name, GQuark new_name) +{ + _startIteration(); + for (auto& iter : _active) { + if (!iter.marked) { + iter.observer.notifyElementNameChanged(node, old_name, new_name); + } + } + _finishIteration(); +} + void CompositeNodeObserver::add(NodeObserver &observer) { if (_iterating) { _pending.push_back(ObserverRecord(observer)); @@ -148,6 +159,12 @@ public: vector.attr_changed(&node, g_quark_to_string(name), old_value, new_value, false, data); } } + + void notifyElementNameChanged(Node& node, GQuark old_name, GQuark new_name) override { + if (vector.element_name_changed) { + vector.element_name_changed(&node, g_quark_to_string(old_name), g_quark_to_string(new_name), data); + } + } }; } |
