diff options
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/input.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 5 | ||||
| -rw-r--r-- | src/extension/system.cpp | 8 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 68eb31e7b..94b0f6ab4 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -165,8 +165,8 @@ Input::open (const gchar *uri) if (doc != NULL) { Inkscape::XML::Node * repr = sp_document_repr_root(doc); - gboolean saved = sp_document_get_undo_sensitive(doc); - sp_document_set_undo_sensitive (doc, FALSE); + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive (doc, false); repr->setAttribute("inkscape:output_extension", output_extension); sp_document_set_undo_sensitive (doc, saved); } diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index eadae090f..7f44fb553 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -21,7 +21,8 @@ SPDocument * GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) { SPDocument *doc = sp_document_new(NULL, TRUE, TRUE); - sp_document_set_undo_sensitive(doc, FALSE); // no need to undo in this temporary document + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL ); Inkscape::XML::Node *rdoc = sp_document_repr_root(doc); gchar const *docbase = rdoc->attribute("sodipodi:docbase"); @@ -92,7 +93,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) //alter the canvas size to fit the image size fit_canvas_to_drawing(doc); // restore undo, as now this document may be shown to the user if a bitmap was opened - sp_document_set_undo_sensitive(doc, TRUE); + sp_document_set_undo_sensitive(doc, saved); } else { printf("GdkPixbuf loader failed\n"); } diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 41d6e7513..c20212930 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -104,8 +104,8 @@ open(Extension *key, gchar const *filename) /* This kinda overkill as most of these are already set, but I want to make sure for this release -- TJG */ Inkscape::XML::Node *repr = sp_document_repr_root(doc); - gboolean saved = sp_document_get_undo_sensitive(doc); - sp_document_set_undo_sensitive(doc, FALSE); + bool saved = sp_document_get_undo_sensitive(doc); + sp_document_set_undo_sensitive(doc, false); repr->setAttribute("sodipodi:modified", NULL); sp_document_set_undo_sensitive(doc, saved); @@ -250,10 +250,10 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, if (official) { // save the filename for next use sp_document_set_uri(doc, fileName); - gboolean saved = sp_document_get_undo_sensitive(doc); + 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); - sp_document_set_undo_sensitive (doc, FALSE); repr->setAttribute("inkscape:output_extension", omod->get_id()); // set the "dataloss" attribute if the chosen extension is lossy repr->setAttribute("inkscape:dataloss", NULL); |
