From 27c72f28d0c3ff4aa591c86348320df3e2cc9791 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Sat, 5 May 2018 14:20:30 +0200 Subject: Workaround for incompatible changes in "LayerMoveTo" verbs --- support/inkscape/inkscape.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'support/inkscape') 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 -- cgit