ICEpdf
  1. ICEpdf
  2. PDF-704

Saving a document doesn't reset the changes collection in the StateManager

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0
    • Fix Version/s: 6.4
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      Windows 7, Windows 8, Mac OS (version?) - probably all OS'es
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      When a document is saved (successfully) the changes collection/hashmap needs to be cleared in the StateManager.

      It would also be nice if it's possible to control the changes collection from "the outside". For example using a method like this in StateManager:

          /**
           * Clears all changes in the state manager
           * To be called when the document is saved
           */
          public void clearChanges() {
           changes.clear();
          }

      Show
      When a document is saved (successfully) the changes collection/hashmap needs to be cleared in the StateManager. It would also be nice if it's possible to control the changes collection from "the outside". For example using a method like this in StateManager:     /**      * Clears all changes in the state manager      * To be called when the document is saved      */     public void clearChanges() {      changes.clear();     }

      Description

      When saving a document the isChanged() method does not reflect the fact that the document has been saved since the last change.

      Procedure:
      - start ICEpdf Viewer 5.0.4
      - open a PDF document
      - create a (random) annotation
      - save the document
      - close ICEpdf Viewer

      Then you'll be prompted to save the changes before saving. This is not a behaviour consistent with common practice - if there are no changes since the last save I'll expect the viewer to simply close down!

      It would be nice if the changes collection is updated automatically when saving the document but we also have implemented other save routines (Save, Save As, AutoSave/Backup, Export locked PDF etc) and would hence also like to be able to clear the changes collection from outside the StateManager() (See suggested solution in the workaround)

        Activity

        Hide
        S. Cribble added a comment -

        Accidentally assigned major priority to this bug - please downgrade to something less critical

        Show
        S. Cribble added a comment - Accidentally assigned major priority to this bug - please downgrade to something less critical
        Hide
        S. Cribble added a comment -

        Is anyone looking at this issue?

        Show
        S. Cribble added a comment - Is anyone looking at this issue?
        Hide
        Patrick Corless added a comment -

        I've taken a look at this issue the clearing the StateManager after save is currently an issue as we don't reopen the written file and any subsequent saves will effectively trump any previous state data

        Pushing out to 5.3 as we are hoping to write full write support to the original file with the option to do the update without an incremental update.

        Show
        Patrick Corless added a comment - I've taken a look at this issue the clearing the StateManager after save is currently an issue as we don't reopen the written file and any subsequent saves will effectively trump any previous state data Pushing out to 5.3 as we are hoping to write full write support to the original file with the option to do the update without an incremental update.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            S. Cribble
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: