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

Bug 407882

Summary: [TabFolder] Shows wrong tab when tab added/disposed
Product: [RT] RAP Reporter: Moritz Post <mpost>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Moritz Post CLA 2013-05-13 10:04:07 EDT
Situation: I have three tabs, currently show the middle tab and create a new tab at index 0 via a button click.

The tab folder shows the new tab but jumps to the tab at position 1 without showing its content. The SWT tabfolder just stays on at the position of the previously middle tab (now at index 2).
Comment 1 Moritz Post CLA 2013-05-13 10:12:44 EDT
A workaround is to store the previously selected tab and set it as the active one after the new tab is added ad index 0.
Comment 2 Moritz Post CLA 2013-05-13 10:19:44 EDT
The same problem and workaround also occurs.
Comment 3 Moritz Post CLA 2013-05-13 10:20:18 EDT
... when disposing items.
Comment 4 Moritz Post CLA 2013-05-13 11:04:40 EDT
There is no workaround when disposing a tabitem in edge cases.

Situation: multiple tabs. Selection at the first one (index = 0). Dispose tab at 0.

Now we can not set the new tab (which was previously at index 1) as the selected one. The tabfolder simply shows it as an empty tab at index 0.

Btw... all these issues can be solved by switching tabs which sets the visibility of the content correctly.
Comment 5 Ivan Furnadjiev CLA 2013-05-14 08:07:18 EDT
Fixed with commit d80a59b2986c56bb71315befb0020d9a3ad99e72.