summaryrefslogtreecommitdiff
path: root/librelogo
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-08-18 00:51:26 +0200
committerLászló Németh <laszlo.nemeth@collabora.com>2015-08-18 00:58:37 +0200
commit181a7b27acf29a2728be5a0eb3696796bc7df3da (patch)
tree5d5f0faf2895d62f1f1fc35f19a29db607bbc558 /librelogo
parent8aff239993e803ece4a8de6102f5dd57b89133fd (diff)
fix broken PICTURE (group handling) of LibreLogo
(a regression caused by the PyUNO changes of commit af8143bc40cf2cfbc12e77c9bb7de01b655f7b30) Change-Id: I62112555a997f8f57059de21e0f0b174f3c673c6
Diffstat (limited to 'librelogo')
-rw-r--r--librelogo/source/LibreLogo/LibreLogo.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 081431cf2f48..0f21c36f35d3 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -865,7 +865,7 @@ def __draw__(d, count = True):
__time__.sleep(0.2)
__time__.sleep(0.2)
_.drawpage.add(shape)
- if __group__:
+ if __group__ != 0:
__group__.add(shape)
if count:
_.shapecache[next(_.shapecount)] = str(_.time)
@@ -880,7 +880,7 @@ def __zoom__():
def __lefthang__(shape):
global __grouplefthang__
- if __group__:
+ if __group__ != 0:
p = shape.getPosition()
if p.X < __grouplefthang__:
__grouplefthang__ = p.X
@@ -915,7 +915,7 @@ def __go__(shapename, n, dot = False, preciseAngle = -1):
if _.continuous or dot:
last = shape.PolyPolygon[-1][-1]
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__:
shape.PolyPolygon = tuple( list(shape.PolyPolygon) + __dots__(n, turtlepos, dx, dy))
else:
@@ -1009,7 +1009,7 @@ def __fillit__(filled = True):
oldshape.Name = ""
shape.Name = __ACTUAL__
_.shapecache[__ACTUAL__] = shape
- if __group__:
+ if __group__ != 0:
__group__.remove(oldshape)
__visible__(shape, True)
_.drawpage.remove(oldshape)
@@ -1461,7 +1461,7 @@ def __groupend__(name = ""):
__grouplefthang__ = min(__groupstack__.pop(), __grouplefthang__)
if name != "":
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)
__dispatcher__(".uno:Copy")
ctx = XSCRIPTCONTEXT.getComponentContext()
@@ -1489,7 +1489,7 @@ def __groupend__(name = ""):
__time__.sleep(0.1)
create_valid_svg_file(name)
__group__ = __groupstack__.pop()
- if __group__ and g:
+ if __group__ != 0 and g != 0:
__group__.add(g)
__removeshape__(__ACTUAL__)