File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1556,7 +1556,17 @@ public void setImage(int index, Image image) {
15561556 * supposed to be rendered in. See bug 513761.
15571557 */
15581558 boolean check = modelIndex == Tree .FIRST_COLUMN && (parent .style & SWT .CHECK ) != 0 ;
1559- parent .createRenderers (column , modelIndex , check , parent .style );
1559+ // Renderers can't be replaced during render on GTK 3.24.41
1560+ // https://github.com/eclipse-platform/eclipse.platform.swt/issues/678
1561+ getDisplay ().asyncExec (() -> {
1562+ // Do not perform request when it is no longer applicable
1563+ if (parent .isDisposed () || parent .columns .length <= index ) return ;
1564+ // On multiple resize requests, perform only the last one
1565+ if (parent .pixbufHeight != iHeight || parent .pixbufWidth != iWidth ) return ;
1566+ int modelIndexAsync = parent .columnCount == 0 ? Tree .FIRST_COLUMN : parent .columns [index ].modelIndex ;
1567+ long columnAsync = GTK .gtk_tree_view_get_column (parent .handle , index );
1568+ parent .createRenderers (columnAsync , modelIndexAsync , check , parent .style );
1569+ });
15601570 }
15611571 }
15621572 }
You can’t perform that action at this time.
0 commit comments