From e50d63f42224cdafece30d78265fb22482fd49d4 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Tue, 15 Jan 2008 05:08:28 +0000 Subject: stop toggling insensitive state for modification flag updates (fixes critical bug #182401) In order to do this, I got rid of sodipodi:modified in favor of a simple flag in SPDocument, also renaming SPDocument::{set,is}Modified to SPDocument::{set,is}ModifiedSinceSave (bzr r4491) --- src/file.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/file.cpp') diff --git a/src/file.cpp b/src/file.cpp index 58ca463bf..c3e7e7583 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -249,7 +249,7 @@ sp_file_revert_dialog() } bool do_revert = true; - if (doc->isModified()) { + if (doc->isModifiedSinceSave()) { gchar *text = g_strdup_printf(_("Changes will be lost! Are you sure you want to reload document %s?"), uri); bool response = desktop->warnDialog (text); @@ -771,7 +771,7 @@ sp_file_save_document(Gtk::Window &parentWindow, SPDocument *doc) { bool success = true; - if (doc->isModified()) { + if (doc->isModifiedSinceSave()) { Inkscape::XML::Node *repr = sp_document_repr_root(doc); if ( doc->uri == NULL || repr->attribute("inkscape:output_extension") == NULL ) @@ -1186,7 +1186,7 @@ sp_file_export_to_ocal_dialog(Gtk::Window &parentWindow) Inkscape::XML::Node *repr = sp_document_repr_root(doc); - if (!doc->uri && !doc->isModified()) + if (!doc->uri && !doc->isModifiedSinceSave()) return false; // Get the default extension name -- cgit v1.2.3