Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save current map views on Save, instead of when closing FreePlane #1745

Closed
euu2021 opened this issue Mar 20, 2024 · 1 comment
Closed

Save current map views on Save, instead of when closing FreePlane #1745

euu2021 opened this issue Mar 20, 2024 · 1 comment

Comments

@euu2021
Copy link
Contributor

euu2021 commented Mar 20, 2024

Freeplane is able to restore map views after restart (feature introduced at this commit: 339eb69). But, if FP is terminated with a crash, the map views are not saved, and FP uses, instead, the layout of the last successful shutdown.

This is a problem to me, because sometimes my FP crashes (due to complicated Jump In situations, but I'm still trying to reproduce it, and I will report in another issue), so I'm frequently losing my map view layouts.

So, I would like to have the map views layout saved together with the map save (i.e., without having to close FP). Ideally, it would also be saved with the automatic map saves, so it survives the crash, although I see that this might be technically difficult.

Alternatively, I would like to know if there is any internal method, to be put in a script, that saves the current map views, without having to close FP.

Thanks,

@euu2021
Copy link
Contributor Author

euu2021 commented Mar 22, 2024

Alternatively, I would like to know if there is any internal method, to be put in a script, that saves the current map views, without having to close FP.

I'm starting to understand how the internal methods work 🤯

This does the trick:

import org.freeplane.features.mode.Controller

Controller.currentController.viewController.saveProperties()
Controller.currentController.resourceController.saveProperties()

I will close the issue, as it seems to be enough for my needs.

@euu2021 euu2021 closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant