from AppKit import NSNotificationCenter
if Glyphs.versionNumber>=3 and Glyphs.font and Glyphs.font.currentTab:
NSNotificationCenter.defaultCenter().postNotificationName_object_("GSUpdateInterface", Glyphs.font.currentTab)
The side bearings should be updated when you set the shapes on the layer. And when that layer is the active layer, the UI should update automatically. Are the side bearings still wrong when you change the layer/master to a different layer and back?
Maybe call layerC.updateMetrics()?
To force an update of the info box, you could call tab.updateFormatBar_("layer") but that shouldnât be needed.
And as long as the layers are compatible, you can use layerC.getPositionsFromLayer_(tempLayer)
I tried to do the same with a custom notification âMFUpdateXYâ in plugin A, instead of "GSUpdateInterface", and properly added a callback for my custom notification name in plugin B, but had no success getting my callback fired.
But when I use the built-in notification name GSUpdateInterface the same setup works.
How could I implement a custom notification name to keep responsibilities separated?