Kaydet (Commit) 181a7b27 authored tarafından László Németh's avatar László Németh

fix broken PICTURE (group handling) of LibreLogo

(a regression caused by the PyUNO changes of
commit af8143bc)

Change-Id: I62112555a997f8f57059de21e0f0b174f3c673c6
üst 8aff2399
...@@ -865,7 +865,7 @@ def __draw__(d, count = True): ...@@ -865,7 +865,7 @@ def __draw__(d, count = True):
__time__.sleep(0.2) __time__.sleep(0.2)
__time__.sleep(0.2) __time__.sleep(0.2)
_.drawpage.add(shape) _.drawpage.add(shape)
if __group__: if __group__ != 0:
__group__.add(shape) __group__.add(shape)
if count: if count:
_.shapecache[next(_.shapecount)] = str(_.time) _.shapecache[next(_.shapecount)] = str(_.time)
...@@ -880,7 +880,7 @@ def __zoom__(): ...@@ -880,7 +880,7 @@ def __zoom__():
def __lefthang__(shape): def __lefthang__(shape):
global __grouplefthang__ global __grouplefthang__
if __group__: if __group__ != 0:
p = shape.getPosition() p = shape.getPosition()
if p.X < __grouplefthang__: if p.X < __grouplefthang__:
__grouplefthang__ = p.X __grouplefthang__ = p.X
...@@ -915,7 +915,7 @@ def __go__(shapename, n, dot = False, preciseAngle = -1): ...@@ -915,7 +915,7 @@ def __go__(shapename, n, dot = False, preciseAngle = -1):
if _.continuous or dot: if _.continuous or dot:
last = shape.PolyPolygon[-1][-1] last = shape.PolyPolygon[-1][-1]
if not (turtlepos and (abs(last.X - turtlepos.X) > 100 or abs(last.Y - turtlepos.Y) > 100) and if not (turtlepos and (abs(last.X - turtlepos.X) > 100 or abs(last.Y - turtlepos.Y) > 100) and
(not __group__ or (shape.getPosition().X > 0 and turtle.getPosition().X > 0))): # picture [ ] keeps hanging shapes (__group__ == 0 or (shape.getPosition().X > 0 and turtle.getPosition().X > 0))): # picture [ ] keeps hanging shapes
if dot or _.linestyle == __LineStyle_DOTTED__: if dot or _.linestyle == __LineStyle_DOTTED__:
shape.PolyPolygon = tuple( list(shape.PolyPolygon) + __dots__(n, turtlepos, dx, dy)) shape.PolyPolygon = tuple( list(shape.PolyPolygon) + __dots__(n, turtlepos, dx, dy))
else: else:
...@@ -1009,7 +1009,7 @@ def __fillit__(filled = True): ...@@ -1009,7 +1009,7 @@ def __fillit__(filled = True):
oldshape.Name = "" oldshape.Name = ""
shape.Name = __ACTUAL__ shape.Name = __ACTUAL__
_.shapecache[__ACTUAL__] = shape _.shapecache[__ACTUAL__] = shape
if __group__: if __group__ != 0:
__group__.remove(oldshape) __group__.remove(oldshape)
__visible__(shape, True) __visible__(shape, True)
_.drawpage.remove(oldshape) _.drawpage.remove(oldshape)
...@@ -1461,7 +1461,7 @@ def __groupend__(name = ""): ...@@ -1461,7 +1461,7 @@ def __groupend__(name = ""):
__grouplefthang__ = min(__groupstack__.pop(), __grouplefthang__) __grouplefthang__ = min(__groupstack__.pop(), __grouplefthang__)
if name != "": if name != "":
name = __groupstack__.pop() name = __groupstack__.pop()
if name and ".SVG" == name[-4:].upper() and g: if name and ".SVG" == name[-4:].upper() and g != 0:
_.doc.CurrentController.select(g) _.doc.CurrentController.select(g)
__dispatcher__(".uno:Copy") __dispatcher__(".uno:Copy")
ctx = XSCRIPTCONTEXT.getComponentContext() ctx = XSCRIPTCONTEXT.getComponentContext()
...@@ -1489,7 +1489,7 @@ def __groupend__(name = ""): ...@@ -1489,7 +1489,7 @@ def __groupend__(name = ""):
__time__.sleep(0.1) __time__.sleep(0.1)
create_valid_svg_file(name) create_valid_svg_file(name)
__group__ = __groupstack__.pop() __group__ = __groupstack__.pop()
if __group__ and g: if __group__ != 0 and g != 0:
__group__.add(g) __group__.add(g)
__removeshape__(__ACTUAL__) __removeshape__(__ACTUAL__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment