From: Erik V. <eri...@xs...> - 2011-07-04 11:37:35
|
Undoing the Coalfields buy action is now visible in the UI. > > I agree that hashmapstate should be observable, however the rails > > solution before that was neither. > > OK, I'll see what I can do in the meantime to fix that. HashMapState now extends ModelObject. MapChange and RemoveFromMap now can take the ModelObject it is changing, and on execute() and undo() the model update() method is now called to update the Observers; this all works the same way as ArrayListState already did. The rights map now uses HashMapState directly. RightsModel has been removed. The RightsModel getText() method has been moved to HashMapState. I hope that the output will be usable for any future use of HashMapState that needs Observers. I have also updated ModelObject.update() to return immediately if there are no observers. This saves unnecessary overhead in constructing unused View text, as would be the case with the other current use of HashMapState, which is has no observers. Erik. |