Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3696

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/96/3696/1

fdo#64082 logo: fix hide/showturtle

Change-Id: I1aa1152940697f6390155871c0128519211abddd
---
M librelogo/source/LibreLogo/LibreLogo.py
1 file changed, 5 insertions(+), 5 deletions(-)



diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 2fa250d..2231646 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -456,7 +456,7 @@
         _.doc.CurrentController.select(shape)
         shape.FillColor, transparence = __splitcolor__(_.areacolor)
         shape.LineColor, shape.LineTransparence = __splitcolor__(_.pencolor)
-    else:
+    elif shape.Visible:
         _.areacolor = shape.FillColor + (int(255.0 * shape.FillTransparence/100) << 24)
         _.pencolor = shape.LineColor + (int(255.0 * shape.LineTransparence/100) << 24)
         if shape.LineWidth != round((1 + _.pen * 2) * __PT_TO_TWIP__ / __MM10_TO_TWIP__) and 
shape.LineWidth != round(__LINEWIDTH__ / __MM10_TO_TWIP__):
@@ -513,7 +513,7 @@
 
 def hideturtle():
     turtle = __getshape__(__TURTLE__)
-    if turtle:
+    if turtle and turtle.Visible:
         z = turtle.getPosition()
         z = __Point__(z.X + turtle.BoundRect.Width / 2.0, z.Y + turtle.BoundRect.Height / 2.0)
         turtle.PolyPolygon = __TURTLESHAPE__[1]
@@ -524,7 +524,7 @@
 
 def showturtle():
     turtle = __getshape__(__TURTLE__)
-    if turtle:
+    if turtle and not turtle.Visible:
         if not turtle.Parent:
             _.drawpage.add(turtle)
         z = turtle.getPosition()
@@ -532,12 +532,12 @@
         turtle.PolyPolygon, turtle.RotateAngle = __TURTLESHAPE__[0], r
         z = __Point__(z.X - turtle.BoundRect.Width / 2.0, z.Y - turtle.BoundRect.Height / 2.0) 
         turtle.setPosition(z)
+        __visible__(turtle, True)
         pencolor(_.pencolor)
         fillcolor(_.areacolor)
         pensize(_.pensize/__PT_TO_TWIP__)
-        __visible__(turtle, True)
         _.doc.CurrentController.select(__getshape__(__TURTLE__))
-    else:
+    elif not turtle:
         __initialize__()
 
 def left(arg=None):

-- 
To view, visit https://gerrit.libreoffice.org/3696
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1aa1152940697f6390155871c0128519211abddd
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Németh László <nemeth@numbertext.org>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.