| Summary: | [CTabFolder] Maximizing a minimized folder fires a "restore" event | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Nobody - feel free to take it <nobody> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | elias, ivan | ||||
| Version: | 1.2 | ||||||
| Target Milestone: | 1.2 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Jordan, I assume this was the bug you mentioned this morning. Elias. Created attachment 138792 [details]
Proposed patch.
There was a typo in CTabFolder.js.
+1 for the patch, this is an obvious mistake and the fix should be included in the release Changes are in CVS HEAD. |
Build ID: latest RAP, FF 3.0.10 on ubuntu 9.04 Steps To Reproduce: 1. Run the provided code 2. Minimize the folder 3. Try to maximize: the folder gets restored, the tool bar icon does not update correctly (showing "minimize" and "maximize" actions) and a "restore" event is fired. 4. Watch the sysouts Expected: the folder gets maximized, the tool bar shows the "minimize" and "restore" icons and a "maximize" event is fired. More information: public class CTabFolderMaximizeMinimized implements IEntryPoint { public int createUI() { Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new GridLayout()); final CTabFolder folder = new CTabFolder(shell, SWT.BORDER); folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); for (int i = 0; i < 1; i++) { CTabItem item = new CTabItem(folder, SWT.NONE); item.setText("Item " + i); Text text = new Text(folder, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); text.setText("Text for item " + i + "\n\none, two, three\n\nabcdefghijklmnop"); item.setControl(text); } folder.setMinimizeVisible(true); folder.setMaximizeVisible(true); folder.addCTabFolder2Listener(new CTabFolder2Adapter() { public void minimize(CTabFolderEvent event) { System.out.println("minimize"); folder.setMinimized(true); shell.layout(true); } public void maximize(CTabFolderEvent event) { System.out.println("maximize"); folder.setMaximized(true); folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); shell.layout(true); } public void restore(CTabFolderEvent event) { System.out.println("restore"); folder.setMinimized(false); folder.setMaximized(false); folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); shell.layout(true); } }); shell.setSize(300, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); return 0; } }