OSDN Git Service

t#31671:add elm copy
[pettanr/pettanr.git] / app / models / panel_picture.rb
index cef80fe..73cbc03 100644 (file)
@@ -203,6 +203,14 @@ class PanelPicture < ActiveRecord::Base
     self.panel.remove_element(self, au)
   end
   
+  def copy from_panel
+    r = PanelPicture.new self.attributes
+    r.panel_id = from_panel.id
+    r.t = r.panel.new_t 
+    r.z = r.panel.new_z 
+    r
+  end
+  
   def scenario
     if caption.blank?
       ''