summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2018-05-05 14:20:30 +0200
committerMichael Schwarz <michi.schwarz@gmail.com>2018-05-05 14:22:24 +0200
commit27c72f28d0c3ff4aa591c86348320df3e2cc9791 (patch)
tree27cdd2a0aa1aa4caeb3293a15623908e7e8dac74
parent69f08a3e741abcd36ef65047677d0e6eb1ce6482 (diff)
downloadpogojig-27c72f28d0c3ff4aa591c86348320df3e2cc9791.tar.gz
pogojig-27c72f28d0c3ff4aa591c86348320df3e2cc9791.tar.bz2
pogojig-27c72f28d0c3ff4aa591c86348320df3e2cc9791.zip
Workaround for incompatible changes in "LayerMoveTo" verbs
-rw-r--r--support/inkscape/inkscape.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/support/inkscape/inkscape.py b/support/inkscape/inkscape.py
index 3a25a15..9fd9528 100644
--- a/support/inkscape/inkscape.py
+++ b/support/inkscape/inkscape.py
@@ -106,8 +106,11 @@ class InkscapeCommandLine(object):
# Inkscape 0.91 places a duplicated layer above (after) the selected
# one and selects the new layer.
new_layer = Layer(layer.inkscape_name + ' copy', layer.export_name, layer.use_paths)
- self._current_layer_index += 1
- self._layers.insert(self._current_layer_index, new_layer)
+ self._layers.insert(self._current_layer_index + 1, new_layer)
+
+ # Whether the original or the new layer is selected after the operation
+ # fluctuates between Inkscape versions.
+ self._current_layer_index = None
return new_layer