           type: 'warning'
         })
 
-    currentSelection = @addComponentsTreema?.getLastSelectedTreema()?.data._id
-
     id = node.data._id
     comp = _.find @componentCollection.models, id: id
     unless comp

      supermodel: @supermodel
      schema: {type: 'array', items: LevelComponent.schema}
      data: ($.extend(true, {}, c) for c in components)
      callbacks: {select: @onSelectAddableComponent, enter: @onAddComponentEnterPressed}
      readOnly: true
      noSortable: true
      nodeClasses:

        majorVersion: c.get('version').major ? 0
      }

    # reselect newly added child treema in the extantComponentsTreema
    for index, treema of @extantComponentsTreema.childrenTreemas
      if treema.component.id is id
        treema.select()
        @onSelectExtantComponent({}, [treema])
        return

  onAddComponentDoubleClicked: (e, treema) =>
    @onAddComponentEnterPressed treema

  reportChanges: ->
    @callback?($.extend(true, [], @extantComponentsTreema.data))
