OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
t#31671:add elm copy
[pettanr/pettanr.git]
/
app
/
models
/
panel_picture.rb
diff --git
a/app/models/panel_picture.rb
b/app/models/panel_picture.rb
index
cef80fe
..
73cbc03
100644
(file)
--- a/
app/models/panel_picture.rb
+++ b/
app/models/panel_picture.rb
@@
-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?
''