Requirements for Saving dialog
Open, Needs TriagePublic


Krita Saving Requirements

  1. Normal saving can happen only when all the actions (strokes) running over the image are finished.
    1. If something is still running, the user sees a progress dialog that asks him to wait
    2. The user has options:
      • Cancel current stroke (a request for stroke cancellation is dispatched and the waiting continues until the action is canceled)
      • Cancel saving (the waiting dialog closes and no saving happens)
      • Save without waiting (dangerous)
    3. If the user selects Save without waiting:
      • the user sees a warning that the saved image may be incomplete(!)
      • Krita suggests him to select a different location for saving
      • Krita locks() the image without waiting for completion of the current stroke
      • If current LoD is not 0, Krita does recovery procedures, that forcefully switch the LoD, save the document and close Krita.
  2. While user-requested saving is in progress the user sees a progress dialog, showing that Krita is busy.
  3. Autosave should not distract the user from his normal work.
    1. The saving happens in background
      1. The autosaver should first wait when all the strokes are finished (or try to insert itself in between running strokes)
      2. Quickly copy the image
      3. Save that copied image in the background
    2. Generation of the mergedimage.png and thumbnail.png for autosaved documents can be disabled. It makes saving faster and doesn't demand regeneration the image
  4. Current problems with cloning of the image
    1. Layer styles are not copied correctly
    2. Layer projections are not copied, therefore we need initialRefreshGraph to generate mergedimage.png and thumbnail.png.
    3. initialRefreshGraph() is slow and allocates a lot of duplicated memory for projections, therefore not using lazy copying.