GNOME Bugzilla – Bug 582821
'Sphere Designer' does not reset correctly...
Last modified: 2009-07-21 16:51:47 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:
Yes, that could be a useful change. Maybe you want to give this a try, as it shouldn't be too complicated?
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.
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)
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
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)
Please make sure you remove trailing whitespace in the code before you recreate the patch. Thanks.
Created attachment 138887 [details] [review] A new git patch to fix the bug Recreated the patch with git, Hopefully it should be OK now.
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(-)
I was a tad too agressive in that commit, will commit a fix in a short while.
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(-)