diff --git a/src/event-log.cpp b/src/event-log.cpp
index 4ee65f3f8417ae9b18c7c295d58b03b4b7b5b04d..977d068f8a2b98d8f4fa940ca51f84cb8bfbbdd9 100644 (file)
--- a/src/event-log.cpp
+++ b/src/event-log.cpp
#include "event-log.h"
#include "inkscape.h"
#include "util/ucompose.hpp"
+#include "document.h"
+#include "xml/repr.h"
+#include "sp-object.h"
namespace Inkscape {
{
// add initial pseudo event
Gtk::TreeRow curr_row = *(_event_list_store->append());
- _curr_event = _last_event = curr_row;
+ _curr_event = _last_saved = _last_event = curr_row;
curr_row[_columns.description] = _("[Unchanged]");
curr_row[_columns.type] = SP_VERB_FILE_NEW;
}
}
+ checkForVirginity();
+
// update the view
if (_connected) {
(*_callback_connections)[CALLB_SELECTION_CHANGE].block();
}
}
+ checkForVirginity();
+
// update the view
if (_connected) {
Gtk::TreePath curr_path = _event_list_store->get_path(_curr_event);
curr_row[_columns.type] = event_type;
curr_row[_columns.description] = log->description;
+ checkForVirginity();
+
// update the view
if (_connected) {
Gtk::TreePath curr_path = _event_list_store->get_path(_curr_event);
}
}
+/* mark document as untouched if we reach a state where the document was previously saved */
+void
+EventLog::checkForVirginity() {
+ g_return_if_fail (_document);
+ if (_curr_event == _last_saved) {
+ _document->setModifiedSinceSave(false);
+ }
+}
+
} // namespace Inkscape
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :