|How to update Save and Undo menus after model change in GEF? [message #242335]
||Thu, 10 April 2008 21:24
Registered: July 2009
I am trying to implement a GEF based editor, subclassing GraphicalEditor. |
A subclass of AbstractTransferDropTargetListener reacts to drop events,
and issues a new Command:
The model is changed, but the menus are not. Currently, I have to manually
call forceFocus() on the viewer's Control to enable the "Save" menu item,
and firePropertyChange(PROP_DIRTY) on the editor itself to have the little
change indicator asterisk (*) appear in the editor's title. I haven't yet
found a way to enable the "Undo" menu item, even though my command
overrides undo() and canUndo().
Shouldn't these menus and widgets get activated automatically when a
command is executed?
Which class would normally be responsible for this? Maybe I missed out
something in the setup...
Thanks in advance!
Powered by FUDForum
. Page generated in 0.02102 seconds