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

Bug 405421

Summary: [Combo] Selection changed when removing by index
Product: [RT] RAP Reporter: Chris Boerger <cidhawk>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Chris Boerger CLA 2013-04-10 22:58:04 EDT
When I programmatically remove an item by index from the possible values, the selected item gets changed.

i.e.

String[] options = new String[] {"One", "Two", "Three"};
Combo c = new Combo(...);

c.setItems(options);
c.select(1); // Set to "Two"
c.remove(0); // Remove "One"
System.out.println(c.getText()); // Will print out "Three"???
c.remove(0); // Remove "Two"
System.out.println(c.getText()); // Bad!

This is not the behaviour in RCP.

I'm using RAP 2.0
Comment 1 Ivan Furnadjiev CLA 2013-04-11 06:51:16 EDT
Fixed in master with commit a6c03d23c1dbb1ee35f713bffa35ce1e27b286c2.