triplus / ShortCuts

Shortcuts overlay for FreeCAD
10 stars 4 forks source link

Error at each workbench change #11

Open 0penBrain opened 2 years ago

0penBrain commented 2 years ago

https://github.com/triplus/ShortCuts/blob/314be7067ada598a2f99e7ad0591b640189cfea1/InitGui.py#L238

Each time I change workbench, I see this error :

Traceback (most recent call last):
  File "<string>", line 739, in applyShortcuts
  File "<string>", line 245, in globalShortcuts
ValueError: Empty group name

This is due to 'IndexList' being empty, thus it's returned as '' (empty string) -- that just after is transformed in a list containing a single value equal to empty string due to split. I guess it could be good after the mentioned line to check if index is an empty string and immediately return if it's the case.

This said, I don't know how this arised.

RushOnline commented 1 year ago

@0penBrain I've created pull request with fix: https://github.com/triplus/ShortCuts/pull/12

Also I see this error when press Shift+Q within 0.20 clean install + this mod.