Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240684 - Disabling a sub menu doesn't work in cascaded menues
Summary: Disabling a sub menu doesn't work in cascaded menues
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.1.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-14 10:47 EDT by Stefan Röck CLA
Modified: 2008-09-24 06:27 EDT (History)
1 user (show)

See Also:


Attachments
Snippet to reproduce the bug (970 bytes, text/plain)
2008-07-14 10:48 EDT, Stefan Röck CLA
no flags Details
Patch that fixed it. (3.65 KB, patch)
2008-07-15 06:47 EDT, Ivan Furnadjiev CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Röck CLA 2008-07-14 10:47:29 EDT
If one uses a MenuListener to hide a sub menu within a menu, the sub menu never gets enabled again, if it has been disabled once. 
The attached patch illustrates this problem.
Comment 1 Stefan Röck CLA 2008-07-14 10:48:16 EDT
Created attachment 107334 [details]
Snippet to reproduce the bug
Comment 2 Ivan Furnadjiev CLA 2008-07-15 06:47:55 EDT
Created attachment 107440 [details]
Patch that fixed it.

In all xxxMenuItemLCA#preserveValues the menuItem.getEnabled() is replaced with menuItem.isEnabled().
Comment 3 Ralf Sternberg CLA 2008-07-16 06:27:53 EDT
Right, the bug was caused by the inconsistent use of isEnabled() and getEnabled() when preserving and writing properties. I revised this and found no reason for using isEnabled() at all (which also takes parent menus into account). Could be a leftover from qx-0.6 times. Changed write methods so that getEnabled() is now used consistently.
Fixed in CVS.