After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 582821 - 'Sphere Designer' does not reset correctly...
'Sphere Designer' does not reset correctly...
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-05-15 21:10 UTC by jbaker
Modified: 2009-07-21 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch to fix the bug when clicking "reset" [Gnu diff] (516 bytes, patch)
2009-05-19 09:48 UTC, LightningIsMyName
none Details | Review
A git patch to fix the bug (1.03 KB, patch)
2009-07-19 07:39 UTC, LightningIsMyName
needs-work Details | Review
A new git patch to fix the bug (1.03 KB, patch)
2009-07-21 07:04 UTC, LightningIsMyName
committed Details | Review

Description jbaker 2009-05-15 21:10:55 UTC
Please describe the problem:
Pressing 'reset' while using the sphere designer resets the preview, but erases all the layers...

Steps to reproduce:
1. New Image
2. Filters > Render > Sphere Designer...
3. Change the texture on the 'Texture/Solid' layer to checker or something... (Just to see that the preview does reset)
4. Click the 'Reset' button...


Actual results:
The preview resets to default and all of the layers get deleted...

Expected results:
The layers should be reset to the default 3 layers...

Does this happen every time?
yes

Other information:
Comment 1 Michael Schumacher 2009-05-18 11:51:13 UTC
Yes, that could be a useful change. Maybe you want to give this a try, as it shouldn't be too complicated?
Comment 2 LightningIsMyName 2009-05-19 09:48:29 UTC
Created attachment 134921 [details] [review]
A patch to fix the bug when clicking "reset" [Gnu diff]

Here is a simple patch to fix the bug in the layer preview. It was tested and it works.

Note: I know we switched to git and this patch is in the gun diff format (not the git-diff). When I get to a computer with git (should be somewhere this week), I'll create a git patch.
Comment 3 LightningIsMyName 2009-07-19 07:39:47 UTC
Created attachment 138722 [details] [review]
A git patch to fix the bug

As requested in the mailing list, I added the patch as a git patch.
(Hopefully I did it correctly :D)
Comment 4 Sven Neumann 2009-07-19 11:56:13 UTC
How did you create this patch? Not only does it have whitespace issues, it's also a broken patch:

Applying: Fixed the bug that caused the Sphere Designer plug-in not to reset correctly (Bugzilla Bug #582821)
/home/neo/git/gimp/.git/rebase-apply/patch:13: trailing whitespace.
      
/home/neo/git/gimp/.git/rebase-apply/patch:19: trailing whitespace.
      
fatal: corrupt patch at line 23
Comment 5 LightningIsMyName 2009-07-19 17:05:13 UTC
That's wierd...
All I did after git created the patch was to save the patch under a different name (I opened a text editor and resaved it).

Something in the text editor probably corrupted the file...
I'll recreate this patch (this time without doing anything afterwards) on the next time that I get to a computer with git (In two days)
Comment 6 Sven Neumann 2009-07-19 21:06:42 UTC
Please make sure you remove trailing whitespace in the code before you recreate the patch. Thanks.
Comment 7 LightningIsMyName 2009-07-21 07:04:38 UTC
Created attachment 138887 [details] [review]
A new git patch to fix the bug

Recreated the patch with git, Hopefully it should be OK now.
Comment 8 Martin Nordholts 2009-07-21 15:53:23 UTC
Thanks! I improved your fix and then pushed it to master and gimp-2-6:

commit 3801e20df8da2643ad5f4578daeb17840eff6841
Author: Barak Itkin <lightningismyname@gmail.com>
Date:   Tue Jul 21 10:01:23 2009 +0300

    Bug 582821 – 'Sphere Designer' does not reset correctly...

    Make sure to always call rebuildlist() after reseting, including after
    interactively clicking the Reset button. Also, we don't need to
    restartrender() after rebuildlist() calls since that is done last in
    rebuildlist() itself.

 plug-ins/common/sphere-designer.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
Comment 9 Martin Nordholts 2009-07-21 16:31:17 UTC
I was a tad too agressive in that commit, will commit a fix in a short while.
Comment 10 Martin Nordholts 2009-07-21 16:51:47 UTC
There we go, commited to both master and gimp-2-6 of course:

commit cabcc592f03ff10bcdbc9c969c53f5c03603483a
Author: Martin Nordholts <martinn@src.gnome.org>
Date:   Tue Jul 21 18:52:12 2009 +0200

    Bug 582821 – 'Sphere Designer' does not reset correctly...

    Make sure to reconstruct the list in the UI when using layers from a
    previous invocation.

 plug-ins/common/sphere-designer.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)