Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discard history on project-file save/load (OpenShot#2468)
* Discard history on project-file save/load (OpenShot#2400) * updates.py: add newline at end of file * conversion: total_size() for data structs * project_data: Log load and save operations Believe it or not, in all the logging OpenShot does, never was the fact that a project file was being loaded or saved actually logged as such. Now it is, complete with the `file_path`. * project_data: Discard history On both load and save of project file data, any `"history"` in the JSON will be discarded, replaced with an empty struct: `{ "undo": [], "redo": [] }` Temporarily, while testing the feature, the total size of the data structure being discarded will first be computed and logged. ``` project_data:INFO Discarding history of size 105246892 bytes ``` * Removing logging of history size, since it does not serve much of a purpose. Soon we need to revisit this and try and improve the persistance of history (within reason to a few dozen changes perhaps), and ensure we don't allow nested histories (since history is an attribute of a project object).
- Loading branch information