     'click #undo-button': 'onUndo'
     'click #redo-button': 'onRedo'
     'click #patches-tab': -> @patchesView.load()
-    'click #components-tab': -> @componentsTab.refreshLevelThangsTreema @level.get('thangs')
+    'click #components-tab': -> @subviews.editor_level_components_tab_view.refreshLevelThangsTreema @level.get('thangs')
     'click #level-patch-button': 'startPatchingLevel'
     'click #level-watch-button': 'toggleWatchLevel'
     'click #pop-level-i18n-button': -> @level.populateI18N()

    @childWindow.focus()

  onUndo: ->
    @getCurrentView()?.undo()

  onRedo: ->
    @getCurrentView()?.redo()

  getCurrentView: ->
    tabText = $('li.active')[0]?.textContent.toLowerCase()
    currentView = @subViews[tabText + 'Tab' ]
    currentView

  startPatchingLevel: (e) ->

    super options
    @supermodel.shouldSaveBackups = (model) ->
      model.constructor.className in ['Level', 'LevelComponent', 'LevelSystem', 'ThangType']
    @levelLoader = new LevelLoader supermodel: @supermodel, levelID: @levelID, headless: true, editorMode: true
    @level = @levelLoader.level
    @files = new DocumentFiles(@levelLoader.level)
