Skip to content

Commit

Permalink
simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
schriftgestalt committed Apr 10, 2024
1 parent 02f7cd4 commit 734b2bb
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions SyncTabs.glyphsPlugin/Contents/Resources/plugin.py
Expand Up @@ -50,20 +50,16 @@ def toggleSyncing_(self, sender=None):

@objc.python_method
def setSyncState(self, state):
if not state:
try:
try:
if not state:
for HOOK in HOOKS:
Glyphs.removeCallback(self.syncEditViews_, callbackType=HOOK)
except:
import traceback
print(traceback.format_exc())
else:
try:
else:
for HOOK in HOOKS:
Glyphs.addCallback(self.syncEditViews_, HOOK)
except:
import traceback
print(traceback.format_exc())
except:
import traceback
print(traceback.format_exc())

self.menuItem.setState_(ONSTATE if state else OFFSTATE)

Expand Down

0 comments on commit 734b2bb

Please sign in to comment.