summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2023-06-23 06:34:30 +0200
committerGitHub <noreply@github.com>2023-06-23 06:34:30 +0200
commita68f6037a98be229f04883d26698a21002f4c86b (patch)
tree97c3393f3bad1fbd2750b3bf9e05517f4593a0c8
parent53c7bdfb1994f4a0c67e4281e09e6ee28d773e2b (diff)
command recognition (#2384)
-rw-r--r--lib/commands.py4
1 files changed, 4 insertions, 0 deletions
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")