Closed danielscottjames closed 7 years ago
@sheyne or @cj, I think is ready to be merged in, can someone give it on more look through?
Mostly works on Windows. The only issue is that for property changes, I have to undo three times and redo three times to see the changes. Also, I'm not sure if this was a problem previously with Windows, but the keybindings for undo/redo are working, now.
@cj which properties are you playing with?
134
~There's still the bug with adding back ElementValue's to the Model. Occasionally you can trigger a "Value not in Environment" error, still.~ #326
Other than that hopefully this doesn't cause errors.
I've debounced undoable events to ~200~ 100 milliseconds. This handles cases such as when you move multiple nodes.. or in the future when the properties panel can edit multiple nodes at a time.
I'll probably keep this regardless, as it allows me to debounce how often a new Program is compiled from the plugin, though events to the graph controller should still be as debounced as possible.
I'm also trying to make a distinction between events that are merely visible, and events that should trigger the plugin to recompile. (moving nodes doesn't trigger a recompile, when I add zooming, nor will that.)
Note: origin and zoom and currently not saved to the core model and therefore not undoable... working on it.