letsfindaway / OpenBoard

I'm using this fork to contribute features and fixes to the upstream project. In order to create good pull requests, I'm rebasing my feature branches, squashing and reordering commits, etc. If you fork this repository be aware that my development branches may rewrite history without prior notice.
http://openboard.ch/
GNU General Public License v3.0
9 stars 0 forks source link

Foreign object manager #105

Closed letsfindaway closed 1 year ago

letsfindaway commented 2 years ago

To solve issue https://github.com/OpenBoard-org/OpenBoard/issues/671, problem 2 I propose to add a ForeignObjectManager, which keeps track of the objects in a document and their usage. It could probably do the following:

letsfindaway commented 2 years ago

Note that the second point needs careful evaluation for several reasons:

So I think it would be too dangerous to do this optimization. And then also the first step is not needed. So finally we would end up with the last step doing a cleanup of unreferenced files.

For the third point note that there is no "save document" function. The UBPersistenceManager only handles scenes, not documents for saving. An idea is to execute this function on the very first call to UBPersistenceManager::persistDocumentScene for a document. This would need a flag in the UBDocumentProxy to mark whether the cleanup was already performed. Implementation of the operation should be in the UBPersistenceManager. It knows about the naming of scene files and already has the private: static QStringList getSceneFileNames(const QString& folder) function, which is very helpful for this.

letsfindaway commented 1 year ago

As discussed above, a Foreign object manager will not be implemented.