Summary: | PaletteStack.setChildren should refresh active entry | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Tools] GEF | Reporter: | Cherie Revells <crevells> | ||||||
Component: | GEF-Legacy GEF (MVC) | Assignee: | Cherie Revells <crevells> | ||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||
Severity: | minor | ||||||||
Priority: | P3 | CC: | ahunter.eclipse, steveshaw | ||||||
Version: | 3.1 | Keywords: | contributed | ||||||
Target Milestone: | 3.4.0 (Ganymede) M5 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows 2000 | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Cherie Revells
2005-10-14 14:59:32 EDT
So you hijack bug 110616 and then reopened a new bug reporting the same problem?? I guess we'll this one now :-) Created attachment 85737 [details]
Patch to fix problem
I have made the change discussed in the comments so that PaletteStack.setChildren() also calls checkActiveEntry().
Randy's second comment also indicates that there is a problem where the active entry is not updated if it becomes hidden. There is a use case to reproduce this problem...
The Customize Palette dialog does not allow the user to hide individual stack items. I think it should. When I changed this in the Customize Palette dialog, I realized that the problem is that if the active entry is hidden, then the entire stack is hidden. The rest of the changes in this patch address this issue.
To summarize the changes:
- PaletteStack now listens to all its children and when it receives notification that the active entry has been hidden it calls checkActiveEntry() to update the active entry.
- checkActiveEntry() has been updated to also check the visibility of the entries.
- The changes in PaletteStackEditPart are required in the scenario where all the stack's children were hidden and then one becomes visible.
Anthony, this one is ready for a code review. It affects the Customize Palette capability that I added in GMF. Looks ok, committed to HEAD Created attachment 85994 [details]
patch to fix NPE
I should have added a null check on the active entry in the PaletteStack.checkActiveEntry() method.
Anthony, can you commit the attached patch? Committed the fix to HEAD. Committed the fix to HEAD. |