Fixed #892 by having the components tab reload whenever it's opened.

This commit is contained in:
Scott Erickson 2014-05-07 16:24:13 -07:00
parent 4221fd55cb
commit ed222338e7
3 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@ block header
li
a(href="#editor-level-settings-tab-view", data-toggle="tab", data-i18n="editor.level_tab_settings") Settings
li
a(href="#editor-level-components-tab-view", data-toggle="tab", data-i18n="editor.level_tab_components") Components
a(href="#editor-level-components-tab-view", data-toggle="tab", data-i18n="editor.level_tab_components")#components-tab Components
li
a(href="#editor-level-systems-tab-view", data-toggle="tab", data-i18n="editor.level_tab_systems") Systems
li

View file

@ -14,7 +14,6 @@ module.exports = class ComponentsTabView extends View
className: 'tab-pane'
subscriptions:
'level-thangs-changed': 'onLevelThangsChanged'
'edit-level-component': 'editLevelComponent'
'level-component-edited': 'onLevelComponentEdited'
'level-component-editing-ended': 'onLevelComponentEditingEnded'
@ -24,8 +23,8 @@ module.exports = class ComponentsTabView extends View
'click #create-new-component-button-no-select': 'createNewLevelComponent'
onLoaded: ->
onLevelThangsChanged: (e) ->
thangsData = e.thangsData
refreshLevelThangsTreema: (thangsData) ->
presentComponents = {}
for thang in thangsData
for component in thang.components

View file

@ -29,6 +29,7 @@ module.exports = class EditorLevelView extends View
'click #fork-level-start-button': 'startForkingLevel'
'click #level-history-button': 'showVersionHistory'
'click #patches-tab': -> @patchesView.load()
'click #components-tab': -> @componentsTab.refreshLevelThangsTreema @level.get('thangs')
'click #level-patch-button': 'startPatchingLevel'
'click #level-watch-button': 'toggleWatchLevel'
'click #pop-level-i18n-button': -> @level.populateI18N()