Commit cee4d0c0 authored by Jarek Kobus's avatar Jarek Kobus Committed by Friedemann Kleint
Browse files

Add a resetClean() method to the undo stack


With the current API it is not possible to reset the
index into -1. We have setClean() method, but
we are lacking setDirty(). This is needed
in case when the document has changed outside
of the editor and nothing has changed
in the undo stack history. In this case we
don't know the state of the file modified
externally so we need to mark that editor's
contents is different from the file contents
and undoing or redoing commands can't bring
the editor to the clean state.
This may also be useful to call it when
we created a new document and haven't saved
it yet or when the document was restored
from backup file.

Task-number: QTCREATORBUG-17048
Change-Id: I64e2052b3559299e0b6939831557a07a59a851b6
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
parent cc30177a
No related merge requests found
Showing with 171 additions and 1 deletion
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment