I don't think zooming or panning the window are 'modifications' (even if they are stored in a .vik file) otherwise doing almost anything will be considered changes!! Hence I don't think using the vlp_update is the way to go.
IMHO Changes are:
.adding/removing/changing properties (including names and sublayer changes - waypoints and tracks) /changing visibility of layers
My thinking was to add a modified flag per layer - which would be true for new items (but not when just loaded). Then whenever (i.e. lots of places) change the state then it's needs to change the modified to true.
For saving it would iterate around all layers to set the modified to false.
For exitting it would iterate around all layers to find any modified flag and then show the exit warning.
Possibly the a modified flag per layer is not necessary and could be flowed up to the window for simplicity.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-09-14
I know I will be the exception, but I actually *like* the current (well, 0.9.94 actually) behaviour to exit without saving or warnings. I have a number of viking files which I use as starting points, and tracks I usually export as gpx. Most of the time I do not want to save changed viewports or zoomlevels, and a popup when closing would just be annoying to me, and it would probably increase the likelyhood of accidentally saving something I don't want to save (which can probably be dealt with by making the files read-only, at the cost of an additional annoying popup ;-) ).
If not too much trouble, a configuration setting to activate/deactivate this feature would be nice.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To reiterate - my plan is *not* to warn when only the view has changed - otherwise you'll practically have a warning every time you use the program.
Only changes to layers should trigger a warning IMHO.
Probably only viewing an external file type (although they are converted into the internal format but this is an automatic process) shouldn't trigger a warning either.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
+1 (or automatically save)
Agreed.
This on my TODO list.
Although I need to think about the best way to implement it.
Initial implementation was disabled by commit a5fd219. The mater is the lack of detection of "modifications".
Furthermore, we have to define what is a "modification" and what is not.
I started a public topic branch for that.
http://repo.or.cz/w/viking/guyou.git/shortlog/refs/heads/track-model-modifications
I don't think zooming or panning the window are 'modifications' (even if they are stored in a .vik file) otherwise doing almost anything will be considered changes!! Hence I don't think using the vlp_update is the way to go.
IMHO Changes are:
.adding/removing/changing properties (including names and sublayer changes - waypoints and tracks) /changing visibility of layers
My thinking was to add a modified flag per layer - which would be true for new items (but not when just loaded). Then whenever (i.e. lots of places) change the state then it's needs to change the modified to true.
For saving it would iterate around all layers to set the modified to false.
For exitting it would iterate around all layers to find any modified flag and then show the exit warning.
Possibly the a modified flag per layer is not necessary and could be flowed up to the window for simplicity.
I know I will be the exception, but I actually *like* the current (well, 0.9.94 actually) behaviour to exit without saving or warnings. I have a number of viking files which I use as starting points, and tracks I usually export as gpx. Most of the time I do not want to save changed viewports or zoomlevels, and a popup when closing would just be annoying to me, and it would probably increase the likelyhood of accidentally saving something I don't want to save (which can probably be dealt with by making the files read-only, at the cost of an additional annoying popup ;-) ).
If not too much trouble, a configuration setting to activate/deactivate this feature would be nice.
To reiterate - my plan is *not* to warn when only the view has changed - otherwise you'll practically have a warning every time you use the program.
Only changes to layers should trigger a warning IMHO.
Probably only viewing an external file type (although they are converted into the internal format but this is an automatic process) shouldn't trigger a warning either.
Code has (eventually!) been added to address this issue.
However the code is made explicitly for this feature (rather than as part of a more comprehensive change for undo purposes).