Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 493572

Summary: GTK3 different behaviour with org.eclipse.swt.widgets.List than GTK2 and Win32 when deleting rows
Product: [Eclipse Project] Platform Reporter: Jonah Graham <jonah>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Jonah Graham CLA 2016-05-12 14:06:34 EDT
The org.eclipse.swt.widgets.List widget behaves differently on GTK3 than it does on GTK2 and Win32 when an item is deleted and that deleted item is the only selected item.

Given "list" is a org.eclipse.swt.widgets.List and list.getSelectionCount() == 1
and you do:

list.remove(list.getSelectionIndex())

With GTK2 and Win32:
after the removal list.getSelectionCount() == 0 and list.getSelectionIndex() == -1

With GTK3:
after the removal list.getSelectionCount() == 1 and list.getSelectionIndex() is adjacent or the same as it was.

I have tested this with GTK 3.18.2 from Fedora 23.


This change caused a CDT regression, Bug 493070
Comment 1 Eric Williams CLA 2016-05-12 14:16:22 EDT
This sounds like bug 461354.

*** This bug has been marked as a duplicate of bug 461354 ***