Fixed a bug where CocoModel wouldn't unset properties on revert because saveBackup is now debounced and would reintroduce those properties.

This commit is contained in:
Scott Erickson 2014-08-26 10:14:36 -07:00
parent 3b6de071f7
commit fb06e58201
2 changed files with 2 additions and 0 deletions

View file

@ -156,6 +156,7 @@ class CocoModel extends Backbone.Model
@_revertAttributes = $.extend(true, {}, @attributes)
revert: ->
@clear({silent: true})
@set(@_revertAttributes, {silent: true}) if @_revertAttributes
@clearBackup()

View file

@ -29,6 +29,7 @@ module.exports = class SettingsTabView extends CocoView
schema = _.cloneDeep Level.schema
schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings
schema.required = _.intersection schema.required, @editableSettings
schema.default = _.pick schema.default, (value, key) => key in @editableSettings
thangIDs = @getThangIDs()
treemaOptions =
filePath: "db/level/#{@level.get('original')}"