GTK4 Treeview 'Gtk-CRITICAL' Message When Ctrl Button Is Pressed
Steps to reproduce
- Run the example code. Press
Ctrl
key.
Current behavior
This message is printed when Ctrl
key is pressed:
(python3:2): Gtk-CRITICAL **: 08:32:54.657: gtk_css_node_insert_after: assertion 'previous_sibling == NULL || previous_sibling->parent == parent' failed
Expected outcome
No Gtk-Critical
message on the terminal output.
Version information
- GTK 4.8.2
- Debian 11.5 based distribution (Flatpak application). Also RPM based distribution (default GTK4).
- I did not built the GTK.
Additional information
Simple example:
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Gdk', '4.0')
from gi.repository import Gtk, Gdk
def on_activate(app):
win = Gtk.ApplicationWindow(application=app)
win.set_default_size(300, 200)
tv = Gtk.TreeView()
win.set_child(tv)
tv_data = [["cell1", "cell2"],
["cell3", "cell4"],
["cell5", "cell6"]]
ts = Gtk.TreeStore(str, str)
e1 = ts.append(None, tv_data[0])
e2 = ts.append(None, tv_data[1])
e3 = ts.append(None, tv_data[2])
tv.set_model(ts)
for i, column_title in enumerate(["col1", "col2"]):
renderer = Gtk.CellRendererText()
column = Gtk.TreeViewColumn(column_title, renderer, text=i)
column.set_cell_data_func(renderer, func1, func_data=i)
tv.append_column(column)
win.present()
def func1(col, cell, model, iter, data):
#cell.set_property('background','green')
cell.set_property('background-rgba', Gdk.RGBA(0.5, 0.5, 0.5, 1))
app = Gtk.Application()
app.connect('activate', on_activate)
app.run(None)