copy selected frame when creating a new frame
This commit is contained in:
parent
10fc63f100
commit
dd5e1f7984
|
@ -87,9 +87,11 @@ class Drawing(Ownable):
|
||||||
return layer
|
return layer
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def NewLayer(self, stName):
|
def NewLayer(self, stName, ascr = None):
|
||||||
if len(self.rglayer) < 8:
|
if len(self.rglayer) < 8:
|
||||||
layerNew = Layer(ansi.Ascr(self.W(), self.H()), stName)
|
if ascr == None:
|
||||||
|
ascr = ansi.Ascr(self.W(), self.H())
|
||||||
|
layerNew = Layer(ascr, stName)
|
||||||
self.rglayer.append(layerNew)
|
self.rglayer.append(layerNew)
|
||||||
return layerNew
|
return layerNew
|
||||||
|
|
||||||
|
@ -475,7 +477,10 @@ class CursorSprite(Cursor):
|
||||||
def StLayerTab(self): return "Frames"
|
def StLayerTab(self): return "Frames"
|
||||||
def NewLayer(self):
|
def NewLayer(self):
|
||||||
stLayer = "Frame " + str(len(self.game.drawing.rglayer) + 1)
|
stLayer = "Frame " + str(len(self.game.drawing.rglayer) + 1)
|
||||||
layerNew = self.game.drawing.NewLayer(stLayer)
|
layer = self.GetLayer()
|
||||||
|
ascr = ansi.Ascr(self.game.drawing.W(), self.game.drawing.H())
|
||||||
|
ascr.PutAscr(layer.ascr)
|
||||||
|
layerNew = self.game.drawing.NewLayer(stLayer, ascr)
|
||||||
if layerNew != None:
|
if layerNew != None:
|
||||||
self.SelectLayer(layerNew)
|
self.SelectLayer(layerNew)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue