On Sun, Sep 11, 2011 at 09:59:49AM +0200, Martin Renold wrote:
> > +class DuplicateLayer(Action):
> > +    def __init__(self, doc, insert_idx=None, name=''):
> > +        self.doc = doc
> > +        self.insert_idx = insert_idx
> > +        snapshot = self.doc.layers[self.insert_idx].save_snapshot()
> > +        self.new_layer = layer.Layer(name)
> > +        self.new_layer.load_snapshot(snapshot)
> > +        self.new_layer.surface.observers.append(self.doc.layer_modified_cb)
> 
> I think you are not using the insert_idx parameter at all, please remove it. 

Ah no, sorry, I was confused by the old way of doing layer actions that I
still had in mind.  You use the index, of course.  Only the default value
(insert_idx=None) is a bit pointless.

-- 
Martin Renold

_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to