diff options
author | Alexander Kurtakov | 2013-08-20 10:49:05 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2013-08-20 10:49:05 +0000 |
commit | b2711372e321f1d46148c930a5bd50d663263ba4 (patch) | |
tree | d01306bccad9f0931f81b4d7d22e92d6f239ffb9 /bundles | |
parent | 15fa06c7afb7092110595397e89e1a803a9f6cad (diff) | |
download | eclipse.platform.swt-b2711372e321f1d46148c930a5bd50d663263ba4.tar.gz eclipse.platform.swt-b2711372e321f1d46148c930a5bd50d663263ba4.tar.xz eclipse.platform.swt-b2711372e321f1d46148c930a5bd50d663263ba4.zip |
Bug 411452 - Search dialogue isn't "reusable" when using GTK 3.x
Hack for GTK3 in order to not get cellDataFunc while clearing as it
calls it for each row-deleted and this causes AAIOB in getId as items
are already cleared but the model is not yet.
By disconnecting the model from the handle while clearing no
intermediate signals are emitted.
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 9472527116..474ff376ee 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -2369,7 +2369,14 @@ public void removeAll () { if (fixAccessibility ()) { ignoreAccessibility = true; } + /** + * Hack for GTK3 in order to not get cellDataFunc while clearing as it calls it for each row-deleted + * and this causes AAIOB in getId as items are already cleared but the model is not yet. + * By disconnecting the model from the handle while clearing no intermediate signals are emitted. + */ + OS.gtk_tree_view_set_model(handle, 0); OS.gtk_tree_store_clear (modelHandle); + OS.gtk_tree_view_set_model(handle, modelHandle); if (fixAccessibility ()) { ignoreAccessibility = false; OS.g_object_notify (handle, OS.model); |