def METHOD_NAME(cls, parent, currentGlyph):
    dialog = cls(currentGlyph, parent)
    result = dialog.exec_()
    currentItem = dialog.glyphList.currentItem()
    newGlyph = None
    if currentItem is not None:
        newGlyphName = currentItem.text()
        if newGlyphName in currentGlyph.layer:
            newGlyph = currentGlyph.layer[newGlyphName]
    return (newGlyph, result)