void clear() { if (parent.currentItem == this) return; if (cached || (parent.style & SWT.VIRTUAL) == 0) { int columnCount = OS.gtk_tree_model_get_n_columns(parent.modelHandle); for (int i = 0; i < columnCount; i++) { OS.gtk_list_store_set(parent.modelHandle, handle, i, 0, -1); } /* * Bug in GTK. When using fixed-height-mode, * row changes do not cause the row to be repainted. The fix is to * invalidate the row when it is cleared. */ if ((parent.style & SWT.VIRTUAL) != 0) { if (OS.GTK_VERSION >= OS.VERSION(2, 3, 2) && OS.GTK_VERSION < OS.VERSION(2, 6, 3)) { redraw(); } } } cached = false; font = null; cellFont = null; }