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 166829 - Text tool dialog misbehaves when there is a floating selection
Text tool dialog misbehaves when there is a floating selection
Status: VERIFIED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal minor
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-02-09 18:22 UTC by jouko holopainen
Modified: 2007-05-24 01:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jouko holopainen 2005-02-09 18:22:49 UTC
Please describe the problem:
Under specific circumstances, the thext selection dialog closes prematurely.

Steps to reproduce:
1. Open an existing JPG file.
2. Select rectangular region.
3. Edit -> Copy.
4. File -> New.
5. Paste.
6. Add text to the new image. 

Actual results:
After entering first character, the GIMP text editor dialog closes.

Expected results:
You can enter the whole text, not just one character.

Does this happen every time?
Yes.

Other information:
rpm -q gives: gimp-2.0.5-0.fc2.3
Comment 1 weskaggs 2005-02-09 18:40:50 UTC
We're not maintaining GIMP 2.0 anymore, so I'm going to close this as WONTFIX. 
And in any case there were a bunch of font-related problems in 2.0.x that have
been fixed in the meantime.  So please upgrade to GIMP 2.2 and expect the
problem to go away.
Comment 2 Joao S. O. Bueno 2005-02-15 00:52:29 UTC
Actually, this is happens due to the floating selection that comes into 
existence when you paste. 
Until you either anchor that floating selection, or promote it to a new layer, 
not much can be performed on the image - and adding a new, unrelated layer 
(text layers even) are part of what one cannot do. 
 
The current behavior of floating selections in themselves is rather confusing, 
as one can see in bug 113477.  
 
However, IMHO, the text tool should either not display a dialog at all if the 
floating selection is active, or silently anchor the floating selection and 
proceed. 
 
Actually, I think the current behavior is buggy enough that it should be fixed 
even on the 2.2 branch. 
 
I am reoppening and changing summary accordingly. 
Comment 3 Nathan Summers 2005-02-15 02:18:31 UTC
It seems to me that the text tool should function equivalently how the
paintbrush tool functions with the floating selection.  I'm a member of the
group that thinks that the floating selection is an anachronism from pre-layer
times and is now more confusing that useful, but as long as we have the floating
selection, operations on it should be consistant.
Comment 4 Sven Neumann 2005-02-18 22:49:08 UTC
Sorry, but floating selections are still necessary. Perhaps not for all
operations they are being used for but they are still necessary. Anyone who
claims that they'd be an anachronism simply hasn't thought about it (or has a
different solution and forgot to tell us about it).
Comment 5 Sven Neumann 2005-02-18 22:52:48 UTC
Let's see... The text tool does actually anchor the floating selection. This
does however happen implicitely at the moment the text layer is being added.
This implicit action changes the undo stack and as a precaution the active tool
is being cancelled. That's why the dialog is being closed.
Comment 6 Michael Natterer 2005-02-19 11:11:45 UTC
This can be easily fixed by adding gimp_tool_control_set_preserve()
around the critical operations.
Comment 7 Michael Natterer 2005-02-19 19:05:31 UTC
My last comment was nonsense, just as Sven's comment #5 ;) The text
tool itself listens to "active-layer-changed" of the image and
resets itself. Anchoring the floating selection emits
"active-layer-changed". Will commit a fix soonish.
Comment 8 Michael Natterer 2005-02-19 19:12:40 UTC
Fixed in both branches:

2005-02-19  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_create_layer): block
	the "active-layer-changed" callback while anchoring the floating
	selection so the callback doesn't reset the text tool in the
	middle of adding a new text layer. Fixes bug #166829.