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 145566 - Editable text cell remains visible and active after tree model was changed
Editable text cell remains visible and active after tree model was changed
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2004-07-07 12:00 UTC by Dmitry M. Shatrov
Modified: 2005-05-24 12:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a testcase showing the bug does NOT exists (5.90 KB, text/plain)
2005-05-23 19:27 UTC, Dmitry M. Shatrov
Details

Description Dmitry M. Shatrov 2004-07-07 12:00:47 UTC
Description of Problem:
Editable text cell remains visible and active after tree model was changed

Steps to reproduce the problem:
1. Create a GtkTextView with editable text cells, and a button that calls
gtk_tree_view_set_model so that tree model is changed
2. run the program, click on editable cell so it has the cursor and is able
to receive keyboard input
3. click the button

Actual Results:
the model changes, but the old model's cell is still visible and
you can edit it

Expected Results:
editable cell should loose focus and dissappear
to give place to new model's cell

How often does this happen?
always

Additional Information:
I use not a button, but another TreeView to change the model. It's a settings
dialog with the list of groups on the left and editable table on the right..
the bug is beign triggered by the user rather often..
Comment 1 Dmitry M. Shatrov 2005-05-22 13:13:19 UTC
The solution to fix the bug is inadequate. If I change a tree model while
editing a cell then the cell of a NEW model is changed, while only a cell of an
old model should be changed.

Looking at the sources didn't give me much. Somebody with good knowledge of
GtkTreeView could do, I hope.

To be more formal, steps to reproduce the problem are just the same as before.

Actual Results: the value of cell of a new model (the model which I switch to)
changes according to the value in an edit field

Expected Results: editing should be stopped as if I pressed <enter> and the
edited-signal should be emitted for a cell of an old model (the model which I
switch from)
Comment 2 Matthias Clasen 2005-05-23 16:08:45 UTC
gtk_tree_view_set_model() calls gtk_tree_view_stop_editing(), so this should work.
Maybe there is a bug in your code ? Could you provide a small, selfcontained
testcase ?
Comment 3 Dmitry M. Shatrov 2005-05-23 19:27:15 UTC
Created attachment 46814 [details]
a testcase showing the bug does NOT exists

You're right, my fault. I'm attaching my test file as long as I wrote it.
It was a long-standing bug in my code, as I thought it to be a gtk+ one, fixed
now :) Thanks and sorry for reopening
Comment 4 Matthias Clasen 2005-05-24 12:10:18 UTC
Good, closing then.