HalfLifeAssetManager
HalfLifeAssetManager copied to clipboard
Rework undo commands to use model snapshot system
Undo commands currently save model data on a case-by-case basis. Panels that show data affected by undo commands listen to specific undo commands to keep themselves in sync. Rework these commands to use a general purpose snapshot system instead.
The command specifies which data it modifies, the base class automatically stores a snapshot containing that data for use by the command and emits events signaling changes made to that data. The actual change code will be able to use the snapshot data to restore changes when undoing, and can use it to make the changes when applying/redoing the changes.