       continue unless shape.fc?
       colors[shape.fc] = true if shapes[key]
     
-    console.log 'buttons?', @buttons
     @buttons.find('button').removeClass('selected')
     @buttons.find('button').each (i, button) ->
       $(button).addClass('selected') if colors[$(button).val()]

    @colorGroups.build()
    @colorGroups.open()
    keys = Object.keys @colorGroups.childrenTreemas
    console.log 'selected?'
    @colorGroups.childrenTreemas[keys[0]]?.$el.click() if keys[0]

  onColorGroupsChanged: =>
    @thangType.set('colorGroups', @colorGroups.data)

  onColorGroupSelected: (e, selected) =>
    console.log 'selected!'
    @$el.find('#color-group-settings').toggleClass('hide', not selected.length)
    treema = @colorGroups.getLastSelectedTreema()
    return unless treema

      $(e.target).toggleClass('selected')
      @updateColorGroup()
    @$el.find('#shape-buttons').replaceWith(buttons)
    @buttons = buttons

  tryToBuild: ->
