From e2db421d1cb153a128f350ea255ba8ed158b0fa1 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 28 Jan 2014 09:22:23 -0800 Subject: [PATCH] Fixed cloning. --- app/views/editor/level/thangs_tab_view.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee index 9c7994c83..b2534fb9d 100644 --- a/app/views/editor/level/thangs_tab_view.coffee +++ b/app/views/editor/level/thangs_tab_view.coffee @@ -220,7 +220,7 @@ module.exports = class ThangsTabView extends View target = target.closest('.add-thang-palette-icon') wasSelected = target.hasClass 'selected' @$el.find('.add-thangs-palette .add-thang-palette-icon.selected').removeClass('selected') - @selectAddThangType(if wasSelected then null else target.attr 'data-thang-type') + @selectAddThangType(if wasSelected then null else target.attr 'data-thang-type') unless key.alt or key.meta target.addClass('selected') if @addThangType false @@ -239,7 +239,7 @@ module.exports = class ThangsTabView extends View @surface.spriteBoss.removeSprite @addThangSprite if @addThangSprite @addThangType = type if @addThangType - @surface.camera.lock() # hmm, this interfere with zooming + @surface.camera.lock() thang = @createAddThang() @addThangSprite = @surface.spriteBoss.addThangToSprites thang, @surface.spriteBoss.spriteLayers["Floating"] @addThangSprite.notOfThisWorld = true @@ -334,7 +334,7 @@ module.exports = class ThangsTabView extends View @world.loadFromLevel serializedLevel, false thang.isSelectable = not thang.isLand for thang in @world.thangs # let us select walls and such @surface?.setWorld @world - @selectAddThangType @addThangType if @addThangType # make another addThang sprite, since the World just refreshed + @selectAddThangType @addThangType, @cloneSourceThang if @addThangType # make another addThang sprite, since the World just refreshed Backbone.Mediator.publish 'level-thangs-changed', thangsData: @thangsTreema.data null