GNOME Bugzilla – Bug 145566
Editable text cell remains visible and active after tree model was changed
Last modified: 2005-05-24 12:10:18 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..
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)
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 ?
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
Good, closing then.