From 0c5b944686a8f7f11461faece073607ff0a41c8a Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Fri, 28 Aug 2015 01:21:58 +0200 Subject: 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. --- support/inkscape/inkscape.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'support') 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) -- cgit