summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2015-08-28 01:21:58 +0200
committerMichael Schwarz <michi.schwarz@gmail.com>2015-09-16 01:50:23 +0200
commit0c5b944686a8f7f11461faece073607ff0a41c8a (patch)
treead42dea213a89f9630d068996394775509e6306c
parent2ca55c2d170a914c1c0032ea23f1a2a183322dd3 (diff)
downloadpogojig-0c5b944686a8f7f11461faece073607ff0a41c8a.tar.gz
pogojig-0c5b944686a8f7f11461faece073607ff0a41c8a.tar.bz2
pogojig-0c5b944686a8f7f11461faece073607ff0a41c8a.zip
Fixed layer mixup when no layer was selected in Inkscape.
The Inkscape export would put objects into the wrong layers or miss objects completely when no layer was selected.
-rw-r--r--support/inkscape/inkscape.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/inkscape/inkscape.py b/support/inkscape/inkscape.py
index 876b0a7..d395992 100644
--- a/support/inkscape/inkscape.py
+++ b/support/inkscape/inkscape.py
@@ -72,8 +72,8 @@ class InkscapeCommandLine(object):
def _go_to_layer(self, layer, with_selection = False):
if self._current_layer_index is None:
- # Initialize to a known state.
- self._current_layer_index = len(self._layers) - 1
+ # Initialize to a known state. We cannot assume that any layer is selected and thus we need as many LayerPrev as we have layers.
+ self._current_layer_index = len(self._layers)
self._go_to_layer(self._layers[0])
target_index = self._layers.index(layer)