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 736666 - Existing text layers, including former ones, block creation of new text layer in some scenarios
Existing text layers, including former ones, block creation of new text layer...
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: User Interface
2.8.14
Other All
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2014-09-15 10:09 UTC by Simon Müller
Modified: 2018-05-24 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a third option for creating a new text layer. (64.65 KB, text/plain)
2014-12-07 20:09 UTC, Kevin Havranek
  Details
This is the result of the "diff" command between the old and new file (3.10 KB, text/plain)
2014-12-07 20:14 UTC, Kevin Havranek
  Details
Result of the "diff -u" command between old and new file (4.35 KB, patch)
2014-12-07 22:42 UTC, Kevin Havranek
reviewed Details | Review

Description Simon Müller 2014-09-15 10:09:32 UTC
https://www.youtube.com/watch?v=wyTMeAWX-E8

- Create new text-layer
- Use "layer to image size", which causes the layer to lose its text information
 as it should. 
- try to add another text layer in empty space: No matter which layer you select in the layer dialog, everytime the "Confirm Text Editing" Popup is shown. It would be much mor convenient if this would only happen, when the "not-anymore-text layer" is selected.
Comment 1 Michael Schumacher 2014-09-18 14:51:05 UTC
This isn't limited to former text layers, it happens with any text layer that covers the whole view.

The workaround is to hide that layer temporarily.
Comment 2 Kevin Havranek 2014-10-24 08:40:37 UTC
Sorry i have done a commit by inadvertence, we are a french students group we work on the Gimp project and we have to search a bug and this one seems to be interresting.

I'm new in BugZilla so by searching some informations i miss click on the commit button.

For the bug if i understand you would like to be able to create a new text layer even if an other one is in full size?
Comment 3 Simon Müller 2014-10-24 08:54:21 UTC
Yep, exactly. Currently it behaves like this: https://www.youtube.com/watch?v=wyTMeAWX-E8

You create a new Text layer and then use "Layer to Image size", so that the Text Layer covers the whole image but isn't a real text layer anymore. From now on every click on the image causes this info dialog to pop-up - no matter which layer you have selected and how many non-text layers are above the former text layer. 

In my Opinion this pop-up should only show, when it's obvious that you are trying to use the text tool on a former text layer, so before showing this dialog, gimp should check whether the selected layer really is a former text layer and otherwise ignore it an create a new text layer as usual.
Comment 4 Michael Schumacher 2014-10-24 11:27:55 UTC
The issue is actually a bit more complex:

If you have a text layer anywhere, and of any size, and other layers above if, then any click with the text tool on a transparent pixel within the text layer boundaries will activate said text layer.

If you click on a non-transparent pixel, you get a new text layer.

This behavior is consistent with e.g. the move tool, as this also moves the first visible (or "tangible") layer it encounters top-down in the layer stack. The difference to the text tool is that for move, you got an easy option to make it move the active layer.


The fact that this also causes the "edit text?" dialog to pop up is a side-effect of the text layer activation.
Comment 5 Kevin Havranek 2014-11-14 10:20:19 UTC
Thanks for your explanation. 

I am not quite sure that I understand correctly your point. Let me explain how I understand it.

When a text layer is made full-size it looses its text properties (is it considered as an image layer, or is it some kind of undefined type?)

When I try to add a new text layer above it, the pop-up dialog is displayed and I am asked whether I would like to edit the existing layer (in which case the layer is resized -- is it a normal behavior?) or to create a new text layer (in which case the content of the full-screen layer is duplicated into the new layer and we have some kind of redundant data -- is it a normal behavior?)

Is it really a bug, or just everything functions as expected?

What should be the logic of making a full-sized text-box. I really can't get the idea. The thing that is not quite normal for me is that when a new layer is created as described in the message of Simon Muller, it should not copy the content of the full-sized layer.

Also I observed another misbehavior. I create a text box, then reduce the size of it so that the text is fully or partially hidden. In this situation if I make the text-box full-sized the content of the box is lost. I imagine that when the text-box loses its text properties, a capture of the box is taken, then transformed as an image and then scaled to full-size. IMHO the new full-size layer should be created from the content of the box and not the visible part of it. What do you think ?

HTH,

--
Kevin
Comment 6 Simon Müller 2014-11-14 11:22:22 UTC
"When a text layer is made full-size it looses its text properties (is it
considered as an image layer, or is it some kind of undefined type?)"

I guess it becomes an image layer with some kind of flag attached to it, which marks it as a former text layer. When you click somewhere into the image, gimp walks through the layer stack and checks whether there is a layer with this kind of flag somewhere beneath the cursor. When it finds such a layer, it displays said dialog. And this is the behaviour I would like to have changed: In my opinion, it only makes sense to show the dialog, when you have the former text layer currently selected in you layer dialog. The whole "click-through all-layers-thing" is not really intuitive (maybe it would be, if you could toggle it like in the move-tool, which Michael Schumacher already mentioned). 





"When I try to add a new text layer above it, the pop-up dialog is displayed and
I am asked whether I would like to edit the existing layer (in which case the
layer is resized -- is it a normal behavior?)"

Yes, I would say this is normal: Gimp just resets the layer to the state before editing it with pixel-only-tools, therefore the layer size is also reset. 



"or to create a new text layer (in
which case the content of the full-screen layer is duplicated into the new
layer and we have some kind of redundant data -- is it a normal behavior?)
[...]
The thing that is not quite normal for me is that when a new layer is
created as described in the message of Simon Muller, it should not copy the
content of the full-sized layer"

This is something you can argue about, but in my opinion, Gimp should simply add an empty Text-Layer and set the focus on it in order to add new text. On the other han, the current behavior is not bad either - maybe you just want to create two versions of the same text. Maybe it would be possible to add a third button, so you can have all three possibilities. To come back to topic: Changing the way the text layer gets activated would help a lot in this case, too: Whe the dialog is just shown when you have the text-layer selected, Gimp can be sure that the redundant data is wanted. If you don't have the layer selected it simply creates a new text layer without asking you anything - problem solved.



"Is it really a bug, or just everything functions as expected?"
As expected by the devs?"

Jep. Everything mentioned in this report is not really a bug but rather workflow-delaying - thats the reason I tagged it as "enhancement" and not as bug.



"What should be the logic of making a full-sized text-box. I really can't get
the idea."

I like to have all my pixel layers in the same size. Some Plugins (Bumpmap e.g. which I often use to "stamp" text into my Images) don't work properly (or don't work at all) when your layers aren't of the same size. So I don't really create a full-sized textbox, but I make it full-sized for further pixel-editing (e.g.: create text -> layer to image size -> Blur -> Bumpmap on other layer). 



"Also I observed another misbehavior. I create a text box, then reduce the size of it so that the text is fully or partially hidden. In this situation if I make the text-box full-sized the content of the box is lost. I imagine that when the text-box loses its text properties, a capture of the box is taken, then transformed as an image and then scaled to full-size. IMHO the new full-size layer should be created from the content of the box and not the visible part of it. What do you think ?"

Hmm, that is a good question. I wouldn't really call it "misbehavior": on one hand, this whole thing is WYSIWYG: Making the text layer full-sized doesn't change the way, your image looks, which is great, because it is just an internal conversion which shouldn't affect the image.
On the other hand, losing text information just because of the conversion is not good either. My suggestion for this would be: When converting from text to pixel, create a pixel-layer which contains all the text but add a layer mask, which hides everything which was not visible in the text-layer (maybe this could be optional, too. So you could change between "old" behavior and my suggestion).
Comment 7 Kevin Havranek 2014-12-07 20:09:42 UTC
Created attachment 292264 [details]
Add a third option for creating a new text layer.

The menu, when you create a text_layer above a full-sized text-layer, had a third option, you can now create a new empty text-layer.

Also now if you choose a new text-layer, this one appear to where you clicked with your mouse and not at the upper left.
Comment 8 Kevin Havranek 2014-12-07 20:14:08 UTC
Created attachment 292265 [details]
This is the result of the "diff" command between the old and new file
Comment 9 Michael Natterer 2014-12-07 21:09:30 UTC
Please attach the output of "diff -u"
Comment 10 Kevin Havranek 2014-12-07 22:42:52 UTC
Created attachment 292270 [details] [review]
Result of the "diff -u" command between old and new file

Here it is :)
Comment 11 Michael Natterer 2015-01-08 22:55:25 UTC
This is actually a bug, not an enhancement.
Comment 12 Michael Schumacher 2016-05-29 11:28:53 UTC
We have to evaluate if we want this for 2.10.
Comment 13 Michael Natterer 2016-05-29 15:07:12 UTC
Kevin, why does this patch use

if (GTK_IS_WIDGET (widget))

instead of simply

if (widget)
Comment 14 GNOME Infrastructure Team 2018-05-24 14:38:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/585.