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
Saveas feature #795
base: master
Are you sure you want to change the base?
Saveas feature #795
Conversation
Unsure why mac is failing. Seems to be unrelated, has something to do with git. |
Thanks for working on this! Without reviewing the code in detail yet, my biggest concern is that this "Save as" feature behaves very differently compared to basically all other applications. A "Save as" usually saves the opened project to a new location, and any further modification on the project will be saved to the new location too. That's currently not the case - any further modification will be stored to the old project location, which is probably not what the user expects. To be honest, I'm not sure how complicated it will be to change this behavior. Maybe it's a matter of a few lines of code, maybe it's a matter of hundreds of lines of code... Another problem I experienced is that a lock file will be created immediately in the new project directory, which makes it impossible to open the new project. One has to restart LibrePCB to invalidate the lock.
Hmm, actually the dialog doesn't require the file to end in .lpp. I suspect the "file must end with .lpp" error comes from
Indeed 🤔 I restarted the CI job. |
This is what applications usually call "Save copy as" or "Save a copy" (e.g. Inkscape). |
Thank you for the feedback. You are right, it is kind of unintuitive. I will take a look at copying the project and switching to it, although not sure if it would require complete reload of the editor. If the change doesn't make sense, it might be worth going the Inkscape route. As said, looking into it. The .lpp thing should be easily fixed. I will be taking a deeper look at the project loading, and asking here if i get any more questions. The intended way to save using the current project and transactionaldirectory/-filesystem design is quite difficult to comprehend (atleast for my part). |
Ah, interesting, so far I never saw such a feature :)
Great! 🎉 Maybe it would not even be a big issue to reload the whole editor. We already do that when updating a project's library. Of course it would be much nicer without such a "workaround", but basically it works and is better than nothing ;) |
Great, good pointer. Will look at that code if the reload workaround is neccesary! |
My implementation of the feature suggested in #741
Works for the most part, missing 2 features: