Re-Interpolate with specific masters

Ok checked Method Reporter and see that .forceRedraw() is for GSEditViewController, and tabs are GSEditViewController objects.

So going back to the suggestion by @SCarewe I tried this

for tab in Font.tabs:
	tab.forceRedraw()
	print(tab)

but the sidebearing still does not update.

Try this:

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)

1 Like

That did it! Thank you

Semi-related:

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?