Skip to content

Instantly share code, notes, and snippets.

@weiweihuanghuang
Created January 28, 2016 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save weiweihuanghuang/9a89b4d9080781c064d3 to your computer and use it in GitHub Desktop.
Save weiweihuanghuang/9a89b4d9080781c064d3 to your computer and use it in GitHub Desktop.
Set Same View in All Tabs
Font = Glyphs.font
Doc = Glyphs.currentDocument
Glyphs.clearLog()
currentGraphicView = Glyphs.currentDocument.windowController().activeEditViewController().graphicView()
thisActivePosition = currentGraphicView.activePosition()
thisVisibleRect = currentGraphicView.visibleRect()
thisScale = currentGraphicView.scale()
for eachTab in Font.tabs:
thisGraphicView = eachTab.graphicView()
# thisGraphicView.zoomViewToRect_( thisVisibleRect )
thisGraphicView.setActivePosition_(thisActivePosition)
thisGraphicView.zoomViewToAbsoluteScale_(thisScale)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment