PickGlyphs issue

Hello, I wrote a small script to paste a component into the background in all masters.

I used PickGlyphs, but I see that that method automatically pasted the selected glyph as a component into the current layer. Is this intentional?

def paste_component_to_background():
 g = PickGlyphs(searchString=Layer.parent.name.split(".")[0])[0]
 if not g:
  return
 if len(g) > 1:
  Message(title="Too many glyphs picked", message="Choose exactly one glyph")

 s = g[0]
 for l in Layer.parent.layers:
  b = l.background
  b.clear()
  c = GSComponent(s)
  b.components.append(c)

paste_component_to_background()

I can’t reproduce it.

True. Me neither. I just got this report from a user, I wrote the script from my phone and didn’t try it out. I will ask again.

can you ask what version of Glyphs the user has?

Hmm, I can produce an unexpected behaviour:

Open any glyph
Run script, select a glyph
The script will paste the component into the background, but also open the selected glyph (replace the current glyph in edit view with the glyph selected in PickGlyphs)

if works for me as it should.