using TreeView::set_cursor in a function connected to CellRendererText::signal_edited



Hello,

I'm having a little problem with editable cells: I have a validity check for data entered into a editable cell, and if it fails, I want to give the user another try to enter something into that same cell.

To get the focus to the previously edited cell again after showing an error message, I use TreeView::set_cursor with the last parameter start_editing set to true (while in the signal handler for signal_edited of the cell renderer).

The problem is that, when confirming the input by clicking somewhere outside the cell, the UI gets messed up: the entry for the edited cell is there as it should (and its content is reset as it should), but can't be confirmed or aborted anymore. I get the following error message on the command line:

Gtk-CRITICAL **: gtk_container_remove: assertion 'gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container)' failed

Is it just not allowed to use set_cursor while handling the confirmation of editing a cell or is this a bug I should file?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]