| Summary: | StackRenderer randomly selects the first tab if it has no selection | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Remy Suen <remy.suen> | ||||||||
| Component: | UI | Assignee: | Project Inbox <e4.ui-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Eric Moffatt <emoffatt> | ||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | ||||||||||
| Version: | 1.0 | ||||||||||
| Target Milestone: | 1.0 RC1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Remy Suen
Created attachment 166604 [details]
Tests patch to reproduce the problem
This has the effect of showing two tabs (the first and the desired tab) when you bring a stack back in the compatibility layer.
Forgot to mention where the suspect code is in: org.eclipse.e4.workbench.ui.renderers.swt.LazyStackRenderer -postProcess(MUIElement) (In reply to comment #0) > 3. Set the stack to be rendered, it will automatically select the first child. The test checks that the second child is rendered. This may or may not be correct. But logically, it should either have nothing selected or the second child selected. Autoselecting the first child doesn't make any sense. You can observe this problem quite easily in your 4.0 SDK. 1. Start Eclipse. 2. Close the 'Problems', 'Javadoc', and 'Declaration' view. 3. Ctrl+3 > Javadoc 4. The 'Javadoc' view comes back but the 'Problems' view can also be seen in the tab folder. 5. Oddly enough, if you close the 'Javadoc' view, the entire stack will disappear! Still there, marking for a look in EC1. Created attachment 172433 [details]
Make bringToTop set the selected element *before* setting the TBR
Committed in >20100622. Applied the patch. Created attachment 172751 [details]
Revert the previous fix and replace it
This fix does not mess with the TBR/Select order but fixes up the LSR to only 'auto-select' an element that is already TBR & visible true.
Committed in >20100625. Applied the patch. |