Gradient Property Palette Bug

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Gradient Property Palette Bug

Post by capellan » Mon Sep 17, 2018 10:55 pm

Hi All,

After editing an imported gradient, the Gradient Property Palette
shows two "OK" buttons and every graphic imported receive a
green color overlay.

Please verify this Gradient Property Palette bug in your own setup:

1) Download the stack Eps Import v05c:
http://andregarzia.on-rev.com/alejandro ... t_V05C.zip
and decompress the zipped folder.

2) Open the stack "eps_import_v05c.rev" using LC9.0.1 (rc3)

3) From the stack "eps_import_v05c", import the file
"Gradients01.ai". (Click the topleft button)
This file opens in a new stack.

4) Select one graphic and edit the gradient.
Change, for example, the number of repetitions
to 4 or 5 and select "Wrap" and "Mirror".

5) From the stack "eps_import_v05c", import the file
"golferGRS.ai" or "Gradients02.ai".
(Click the topleft button). This file opens
in a new stack and every graphic have a
green color overlay.

6) Try these exact steps using an early LC version.
Graphics DO NOT show a green color overlay.

By the way, Navigator 6.2 alpha 1 works great for
editing gradients! :D

viewtopic.php?f=13&t=31495

Tonight, I will make more tests but as far as I tested,
Navigator 6.2 alpha 1 reads and write gradients
without producing errors.

Please report your results, Operating System
and LC Version to create a report in the
Quality Center.

Thanks in advance!

Al
LC Gradient Bug 001.png
Gradient Palette Bug
Gradient_Green_Color_Overlay_Bug_02.png
Green color overlay

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3317
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Gradient Property Palette Bug

Post by bn » Tue Sep 18, 2018 9:49 am

Hi Al,

when you import you use the templateGraphic in button "bz4" you use the templateGraphic without resetting it.

if you reset the templateGraphic before using it I can not see your problem anymore.

you can test the templateGraphic from the message box:

Code: Select all

put the colorOverlay["color"] of the templateGraphic
-- >154,205,50
after increasing the repeat count on the gradient in one of your graphics from "Gradients01.ai" I can see that the color overlay is set by using the message box.

Now you open "Gradients02.ai" using the templateGraphic and the colorOverlay is applied to all graphics.

Why the colorOverlay is set when increasing the repeat count I don't know and is not really important. It would have been nice to have reset the templateGraphic after using it by whatever handler has used it.

But the most important part is when using the templateGraphic (or any other template) to

reset

it before use.

So I don't think this is a bug on the LC side of things but at most a little oversight. Assuming that the colorOverlay was not set by the engine. This is unlikely since it does not happen when I increase the repeat count on a newly created polygone graphic with linear gradient.

Kind regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3317
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Gradient Property Palette Bug

Post by bn » Tue Sep 18, 2018 12:22 pm

Hi Al,

looging a little more into this the it does not become clear what happens but you can tell when.

I made a little stack that tracks the "colorOverlay" of the templateGraphic every 200 milliseconds


trackTemplateGraphicOverlay.livecode.zip
(1.33 KiB) Downloaded 48 times


when starting LC 9.0.1 open this stack and start watching.

Now you open your file "Gradients01.ai" via your importer.

now you open an inspector for your new temporary stack with the number
the inspector just for the stack (e.g. via Menu -> Object -> Stack Inspector)

now in the inspector go to tab "colors". That triggers setting of the colorOverlay of the templateGraphic.

I have no idea why. Maybe there is something in your code or in the Properties Inspector.

But resetting the templateGraphic in your script still makes it work when importing e.g. "Gradients02.ai"

I did not find this behavior when opening and inspecting a new stack -> colors.

Kind regards
Bernd

capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Gradient Property Palette Bug

Post by capellan » Tue Sep 18, 2018 2:04 pm

Hi Bernd,

Many Thanks for testing this in your own setup.

Resetting the template graphic could be the best workaround
but notice that editing the same gradient using the latest version
of Geoff Canyon's RevNavigator do not change the color overlay
in the template graphic so all graphics imported after editing
a gradient do not show a green color overlay.

In the screenshot, Why the Gradient palette shows two
Ok buttons while "Mirror" and "Wrap" disappeared?

Al
Gradient Palette Bug 03.jpg
Gradient Palette Bug

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3317
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Gradient Property Palette Bug

Post by bn » Tue Sep 18, 2018 2:28 pm

Hi Al,
In the screenshot, Why the Gradient palette shows two
Ok buttons while "Mirror" and "Wrap" disappeared?
because you opened two palettes, Properties Inspector does not like this. I have seen it before and reproduced it just now. PI assumes you close a palette once you are done with the settings.
You may to call this a bug.
Resetting the template graphic could be the best workaround
it is not a workaround it is NECESSARY every time you use a template.
the templates are global and any part of the IDE or other stacks can use them. You can not rely on the templates being "reset". If you do it then at your own risk.

but notice that editing the same gradient using the latest version
of Geoff Canyon's RevNavigator do not change the color overlay
in the template graphic so all graphics imported after editing
a gradient do not show a green color overlay
That is probably because Geoff does not set the colorOverlay of the templateGraphic. Livecode IDE may do so.

As I outlined above the colorOverlay of the templateGraphic is probably set by the Properties Inspector.
I tried to find where but did not find anything. But the PI is a complex beast so I may have looked at the wrong places.

If you are looking for bugs there are plenty. I just can not see this being one.
It is just bad practice to rely on the templates being reset when you use them. And you where just lucky that it worked up until now.

Kind regards
Bernd

capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Gradient Property Palette Bug

Post by capellan » Tue Sep 18, 2018 4:24 pm

Many Thanks for the well thought explanation.
Now, I have to check in detail the default
values of template objects in LiveCode 9.

If the unwanted green color overlay is just a side effect
of another bug, eventually it will solve itself, without
anybody noticing.

Al

capellan
Posts: 610
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: Gradient Property Palette Bug

Post by capellan » Thu Sep 20, 2018 6:51 pm

By the way, as you wrote, the green color overlay disappears after
resetting the template graphic. This was tested (and works) with
Eps Import v05c and SVGL plus Gradients (Alpha).

Thanks a lot for providing a workaround for this.

Al

Post Reply

Return to “Bug Triage”