add ignore layer command to display stacking order (#2719)

pull/2722/head
Kaalleen 2024-02-10 20:16:55 +01:00 zatwierdzone przez GitHub
rodzic d929336f08
commit 0fb7d82f72
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -5,6 +5,7 @@
import inkex
from ..commands import add_layer_commands
from ..i18n import _
from ..svg.tags import INKSCAPE_GROUPMODE, INKSCAPE_LABEL
from .base import InkstitchExtension
@ -28,6 +29,8 @@ class DisplayStackingOrder(InkstitchExtension):
position = next(path.end_points)
self.insert_stacking_num(layer, i + 1, position)
add_layer_commands(layer, ["ignore_layer"])
# remove layer if empty
if len(layer) == 0:
self.svg.remove(layer)