Menu

#11 Exit warning

v1.10
closed
nobody
7
2021-11-30
2008-01-23
Anonymous
No

Display warning on exit if something was modified (new waypoints added, etc.)

Discussion

  • Paul Gevers

    Paul Gevers - 2010-01-05

    +1 (or automatically save)

     
  • Rob Norris

    Rob Norris - 2011-01-27

    Agreed.
    This on my TODO list.
    Although I need to think about the best way to implement it.

     
  • Rob Norris

    Rob Norris - 2011-01-27
    • priority: 5 --> 7
     
  • Guilhem BONNEFILLE

    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.

     
  • Rob Norris

    Rob Norris - 2011-10-11

    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.

     
  • Anonymous

    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.

     
  • Rob Norris

    Rob Norris - 2012-09-14

    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.

     
  • Rob Norris

    Rob Norris - 2021-06-19
    • status: open --> pending
    • Group: Future Release --> v1.10
     
  • Rob Norris

    Rob Norris - 2021-06-19

    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).

     
  • Rob Norris

    Rob Norris - 2021-11-30
    • status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB