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 336864 - Cannot undo gimp-drawable-fill
Cannot undo gimp-drawable-fill
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: libgimp
2.2.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-04-01 19:54 UTC by Tze-I Yang
Modified: 2008-01-15 13:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tze-I Yang 2006-04-01 19:54:51 UTC
When I do a gimp-drawable-fill in the script-fu console, it seems to overwrite the last state of the layer and I cannot undo it.

To replicate this problem:
1. Create a new image.
2. Draw something on it so you can recognize a change.
3. Open the script-fu console.
4. Do the following for three different cases.
   => (set! img N)
   => (set! drawable (car (gimp-image-get-active-drawable img)))
   a. => (gimp-selection-all img)
      => (gimp-edit-clear drawable)
      => (gimp-drawable-fill drawable BACKGROUND-FILL)
      Try to undo your actions.
   b. => (gimp-selection-all img)
      => (gimp-drawable-fill drawable BACKGROUND-FILL)
      Try to undo your actions.
   c. => (gimp-drawable-fill drawable BACKGROUND-FILL)
      Try to undo your action.

All cases result in a blank layer filled with the background color.
In case a there are two actions you can undo, the Clear and the Select All.
In case b there is one action you can undo, the Select All.
In case c there are no actions you can undo.
In cases a and b, when you undo the last action, the layer still looks the same.
Comment 1 Carol 2006-04-02 03:49:23 UTC
This is more of a statement of fact than a bug report.

Undo is not a pdb enabled action.

I cannot think of a situation where a script would need to or want to undo its actions.

I am closing this bug as NOTABUG.  If there is a situation in which undo is needed for a script, open a new bug report "Add undo to pdb" and present the situation it would be needed (or even helpful) in.
Comment 2 Tze-I Yang 2006-04-02 08:27:22 UTC
Hi,

I am not requesting the addition of undo to pbd. I am saying that if I apply gimp-drawable-fill to a layer, I can't undo the effects by Edit->Undo or Crtl+Z.

Thank you.
Comment 3 Carol 2006-04-02 08:47:53 UTC
Yes.  I understand that.  It is expected behavior though.

If you think that this behavior should be changed, you should file a new bug report in which you give an example of a use for this behavior.

Comment 4 Michael Natterer 2006-04-02 11:06:41 UTC
Reopening as documentation bug. gimp-drawable-fill is intentionally
not undoable. It's meant to initialize a *newly created* drawable
without wasting undo memory. It must not be used on existing drawables,
because that would leave the image in an un-undoable state.
You are looking for gimp-edit-fill instead.
Comment 5 Róman Joost 2006-04-03 08:16:07 UTC
Does this apply to only this particular function? 

If thats the case, I'm not sure if the manual is the correct place for that. We provide one tutorial for the script-fu intermediates and one tutorial how people can install scripts. None of them (in my opinion) covers such a detail of writing scripts.

If some of the actions aren't undoable, I could add a note, that people should be aware of that. Maybe a list of actions are helpful.

I accept it as a documentation bug at first.
Comment 6 Michael Schumacher 2006-04-03 09:12:59 UTC
IMO it's api documentation and should appear in the pdb browser help text for this function. Which component would be most appropriate for this - libgimp, Script-Fu, ...? The API keyword would fit, at least.
Comment 7 Sven Neumann 2006-04-03 12:51:27 UTC
This is not a bug about the user manual, it is simply a request for improving the API documentation for the PDB call. This is not strictly speaking part of libgimp, but we have always used the libgimp component for PDB API bugs.
Comment 8 Sven Neumann 2006-04-03 12:59:22 UTC
2006-04-03  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb: improved API documentation for
	gimp-drawable-fill (bug #336864).

	* app/pdb/drawable_cmds.c
	* libgimp/gimpdrawable_pdb.c: regenerated.

Comment 9 Michael Natterer 2006-04-03 15:37:50 UTC
...and I meant libgimp, not help :) sorry for the confusion...