def METHOD_NAME(self):
    #logger.debug('LayerPanel._update1()')
    self.fp.Clear()
    h = 0
    print('Creating layers GUI')
    for i, layer in enumerate(self.visFr.layers):
        #print(i, layer)
        item = lfp.LayerFoldingPane(self.fp, layer=layer, caption='Layer %d' % i, pinned=False, folded=True)
        page = layer.edit_traits(parent=item, kind='subpanel')
        item.AddNewElement(page.control)
        h = max(h, item.GetBestSize().height)
        self.fp.AddPane(item)
        self.pages.append(page)
        #self.fp.fold1(item)
        #print('Added layer: ', i)
    n_layers = len(self.pages)
    if  n_layers > 1:
        h += (n_layers -1)*(item.stCaption.GetBestSize().height+5)
    print('height: ', h)
    #self.fp.SetMinSize((200, h))
    #self.vsizer.Fit(self.pan)
    #self.pan.SetMinSize(self.pan.GetSize())
    self.sizer.Fit(self)
    #print self.pan.GetBestSize(), self.pan.GetSize(), self.GetBestSize(), self.GetSize()
    print('NB best size: ' + repr(self.fp.GetBestSize()))
    try:
        self.GetParent().GetParent().Layout()
    except AttributeError:
        pass
    if n_layers >= 1:
        item.Unfold()
    #logger.debug('Layer panel update done')