What should count as "Unsaved document"?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: What should count as "Unsaved document"?

Post by jmaustpc »

openBrain wrote: Mon Oct 05, 2020 2:35 pm As another example, exporting a Techdraw drawing to PDF also marks the document as changed (which is even worse than when changing visibility, as it really changes nothing). ;)

that sounds like it doesn't need to change to "unsaved",
digitalgoose wrote: Mon Oct 05, 2020 2:18 pm -- including minor changes such as visibility toggles -- introduce an asterisk to the document name and prompt the user with the "Unsaved document" popup when closing the document.

This leads to some user uncertainty about whether to save the document. I propose that insubstantial changes such as visibility state should not "count" when it comes to the unsaved document prompt.
That is a really silly and dangerous idea, of course visibility (the state of the "Visibility" property) should be stored and hence changes of it require a save.
digitalgoose wrote: Mon Oct 05, 2020 6:33 pm How do others feel about setting this as a default?
Absolutely not, what a dangerous and ridiculous idea.

It is absolutely imperative that you know exactly what a file will look like when someone else first opens it. When either teaching someone how to use FreeCAD or showing a product to a potential user/customer, then it is important to know exactly what they will be seeing when they first open the file. Not just hidden property status but also camera angle, zoom level etc. Never under estimate how stupid the general public (and especial very intelligent people) can be when using a computer. By knowing exactly what they will see on first opening the file can be one useful tool to understand what they are talking about when discussing it over the phone for example.

An example that really happened to me (variations on this have happened many times)
"What do you think of the shape of the handle on 'part B'?"'
"I don't know, something is wrong with your file, it does not show Part B, it's there in the list on the left but is not there in the window, must be a bug in FreeCAD or your file must be corrupt."
"What are you talking about? It's right there on the left of Part A"
"No definitely not, must be a bug in FreeCAD"
"Garbage it's there... wait click on 'zoom fit all'" (didn't think of that at first because I didn't think a user could be that stupid.)
"Oh wow, now I see it"

Another issue I just noticed, camera position is saved but does not set the file to an "unsaved" state. This is dangerous, if anything changes the file then it should change the file state by default.

Cyclonit wrote: Mon Oct 05, 2020 2:49 pm How is visibility of imported parts from other documents? If visibility is set in the importing document, visibility changes should not count as changes to the file. If it is set in the imported document, it should.
It doesn't in standard FreeCAD 0.19. It sounds like you are talking about one of the third party add ons. If so then that is a matter to bring up with the relevant developer of that add on.


I am testing in today's 0.19 from the daily PPA.

OS: Ubuntu 18.04.5 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 0f7979f4ae91f0a6127fb0a8dd3c1ba8b183b52f
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: What should count as "Unsaved document"?

Post by DeepSOIC »

this is indeed a moot area.

For example, it's not uncommon that i find an instance of freecad that was open for several days, and i don't quite remember if the file was only opened for looking something up, or i indeed did change something. Then i get anxious, because i may have changed that file in another instance, made important changes and saved it, and closed, so resaving this unchanged version will wipe out the important changes. Saving is not always safe.

FreeCAD is actually really rarely a problem here, because it creates backups. I have hurt my data this way with some other applications, though, so i have a dislike for when the file gets marked as changed if i merely explore it.

Programming environments (IDEs) often store information like visibility in separate files. These files are usually excluded from version control. I don't know if it's possible to set this up in freecad, as visibility of objects is indeed sometimes an important part of the project.

So there may be a need to split view property values into permanent and transient states, where permanents are written to files, while transients are not. It can also potentially allow multiple views of the same project with different stuff visible, if transients are associated to a view. But this is quite a revolution proposal here. I have partially made it work with visibility automation (TempoVis thing), but it is very very far from perfect.
chrisb
Veteran
Posts: 53939
Joined: Tue Mar 17, 2015 9:14 am

Re: What should count as "Unsaved document"?

Post by chrisb »

I have recently learned that exporting to Step format has an option to export only visible objects. So the visibility can be really essential information.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: What should count as "Unsaved document"?

Post by GeneFC »

It seems this discussion has gone slightly astray.

The issue is only the "nag screen" popup. There is no change proposed to automatically saving or not saving. Ultimately users are responsible to know if they have a special case, such as multiple instances of the same file open at the same time.

Otherwise I see little harm in the existing rather inclusive popup.

Gene
Post Reply