@listenTo(this, 'ready', @ready)\r
if item.item_name() == @target_model.item_name()\r
# Inspire\r
- new_item = new @target_model(item.attributes)\r
- @trigger('ready', new_item)\r
+ balloon_list = item.has_one('balloon')\r
+ speech_list = item.has_one('speech')\r
+ balloon_list.open(() =>\r
+ balloon = balloon_list.items()[0]\r
+ speech_list.open(() =>\r
+ speech = speech_list.items()[0]\r
+ new_item = new @target_model(item.attributes)\r
+ new_item.unset('id', {silent: true})\r
+ new_item.set({panel_id: @editor().item.get('id')}, {silent: true})\r
+ balloon.unset('id', {silent: true})\r
+ balloon.unset('speech_balloon_id', {silent: true})\r
+ speech.unset('id', {silent: true})\r
+ speech.unset('speech_balloon_id', {silent: true})\r
+ new_item.boosts 'post'\r
+ balloon.boosts 'post'\r
+ speech.boosts 'post'\r
+ new_item.set({balloon: balloon, speech: speech}, {silent: true})\r
+ @trigger('ready', new_item)\r
+ )\r
+ )\r
else if @target_model.is_traceable(item.item_name())\r
# Trace\r
n = @target_model['trace_from_' + item.item_name()]\r