From a68f6037a98be229f04883d26698a21002f4c86b Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 23 Jun 2023 06:34:30 +0200 Subject: command recognition (#2384) --- lib/commands.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/commands.py') diff --git a/lib/commands.py b/lib/commands.py index bd4bd6d5..d93954ec 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -88,6 +88,10 @@ class BaseCommand(object): if self.command.startswith('inkstitch_'): self.command = self.command[10:] + # It is possible that through copy paste or whatever user action a command is defined multiple times + # in the defs section. In this case the id will be altered with an additional number (e.g. inkstitch_trim-5) + # Let's make sure to remove the number part to recognize the command correctly + self.command = self.command.split("-")[0] else: raise CommandParseError("symbol is not an Ink/Stitch command") -- cgit v1.2.3