X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdocument-undo.cpp;h=ae1c82e71f4e4d2e02b4ab2e6e480599ac26096f;hb=57eb32794c2df43d60ee8f0a9aa8576567358ce6;hp=7556d2e8fed7df52a16ad5c00f551d8a006b62af;hpb=e7333a0a54c8d33b7397406dd76938aa430836d5;p=inkscape.git diff --git a/src/document-undo.cpp b/src/document-undo.cpp index 7556d2e8f..ae1c82e71 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -58,6 +58,8 @@ #if HAVE_STDLIB_H #endif +#include +#include #include "xml/repr.h" #include "document-private.h" #include "inkscape.h" @@ -199,9 +201,7 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int ev doc->actionkey = key; doc->virgin = FALSE; - if (!doc->rroot->attribute("sodipodi:modified")) { - doc->rroot->setAttribute("sodipodi:modified", "true"); - } + doc->setModifiedSinceSave(); sp_repr_begin_transaction (doc->rdoc); @@ -267,7 +267,7 @@ sp_document_undo (SPDocument *doc) sp_repr_undo_log (log->event); doc->priv->redo = g_slist_prepend (doc->priv->redo, log); - doc->rroot->setAttribute("sodipodi:modified", "true"); + doc->setModifiedSinceSave(); doc->priv->undoStackObservers.notifyUndoEvent(log); ret = TRUE; @@ -313,7 +313,7 @@ sp_document_redo (SPDocument *doc) sp_repr_replay_log (log->event); doc->priv->undo = g_slist_prepend (doc->priv->undo, log); - doc->rroot->setAttribute("sodipodi:modified", "true"); + doc->setModifiedSinceSave(); doc->priv->undoStackObservers.notifyRedoEvent(log); ret = TRUE;