Skip to content

Commit

Permalink
Don't fall back to current document
Browse files Browse the repository at this point in the history
  • Loading branch information
jenskutilek committed May 15, 2024
1 parent ca1da87 commit f7a7a1d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Favourites.glyphsPlugin/Contents/Resources/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,20 @@ def getPath(self, info) -> None | str:

obj = info.object()
if DEBUG:
print(f"getPath: {obj}")
pass
# print(f"getPath: {obj}")
try:
doc = obj.windowController().glyphsDocument()
except: # noqa: E722
try:
doc = obj.windowController().document()
if DEBUG:
print(f" obj.windowController().document(): {doc}")
if doc is None:
if DEBUG:
print(" Falling back to Glyphs.currentFontDocument()")
# FIXME: Stop timer when there is no document
doc = Glyphs.currentFontDocument()
# if doc is None:
# if DEBUG:
# print(" Falling back to Glyphs.currentFontDocument()")
# # FIXME: Stop timer when there is no document
# doc = Glyphs.currentFontDocument()
except: # noqa: E722
return

Expand Down

0 comments on commit f7a7a1d

Please sign in to comment.