From 5b0e996f932b5b827c004d4aaefe92fa5d17e8f7 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 2 Sep 2014 17:46:52 -0700 Subject: [PATCH] Think I may have fixed the color group setting issue again. --- app/models/CocoModel.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee index 44a99bee3..4345ae728 100644 --- a/app/models/CocoModel.coffee +++ b/app/models/CocoModel.coffee @@ -154,7 +154,10 @@ class CocoModel extends Backbone.Model markToRevert: -> if @type() is 'ThangType' - @_revertAttributes = _.clone @attributes # No deep clones for these! + # Don't deep clone the raw vector data, but do deep clone everything else. + @_revertAttributes = _.clone @attributes + for smallProp, value of @attributes when value and smallProp isnt 'raw' + @_revertAttributes[smallProp] = _.cloneDeep value else @_revertAttributes = $.extend(true, {}, @attributes)