summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-02-04 04:32:44 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-02-04 04:32:44 +0000
commitd8853d30685207daba0c8f7c57f9601875b8d840 (patch)
tree7919836b70f0e1cbb245eaa38b6481f79ec041f8 /src
parenttweak parameters for more responsiveness (diff)
downloadinkscape-d8853d30685207daba0c8f7c57f9601875b8d840.tar.gz
inkscape-d8853d30685207daba0c8f7c57f9601875b8d840.zip
null the sodipodi:modified before saving, not after; whitespace
(bzr r2323)
Diffstat (limited to 'src')
-rw-r--r--src/extension/system.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index c20212930..c653cc438 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -245,23 +245,33 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension,
throw Output::no_overwrite();
}
+ if (official) {
+ bool saved = sp_document_get_undo_sensitive(doc);
+ sp_document_set_undo_sensitive (doc, false);
+ Inkscape::XML::Node *repr = sp_document_repr_root(doc);
+ repr->setAttribute("sodipodi:modified", NULL);
+ sp_document_set_undo_sensitive (doc, saved);
+ }
+
omod->save(doc, fileName);
if (official) {
// save the filename for next use
sp_document_set_uri(doc, fileName);
+
bool saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive (doc, false);
- // also save the extension for next use
- Inkscape::XML::Node *repr = sp_document_repr_root(doc);
- repr->setAttribute("inkscape:output_extension", omod->get_id());
- // set the "dataloss" attribute if the chosen extension is lossy
- repr->setAttribute("inkscape:dataloss", NULL);
- if ( omod->causes_dataloss() ) {
- repr->setAttribute("inkscape:dataloss", "true");
- }
- repr->setAttribute("sodipodi:modified", NULL);
- sp_document_set_undo_sensitive (doc, saved);
+
+ // also save the extension for next use
+ Inkscape::XML::Node *repr = sp_document_repr_root(doc);
+ repr->setAttribute("inkscape:output_extension", omod->get_id());
+ // set the "dataloss" attribute if the chosen extension is lossy
+ repr->setAttribute("inkscape:dataloss", NULL);
+ if ( omod->causes_dataloss() ) {
+ repr->setAttribute("inkscape:dataloss", "true");
+ }
+
+ sp_document_set_undo_sensitive (doc, saved);
}
g_free(fileName);