summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/gdkpixbuf-input.cpp
diff options
context:
space:
mode:
authorMichael G. Sloan <mgsloan@gmail.com>2006-08-26 01:31:22 +0000
committermgsloan <mgsloan@users.sourceforge.net>2006-08-26 01:31:22 +0000
commit36a1242bc96b3afee539421ec2c38d9934dd5095 (patch)
tree0148b856984f87a8229675a65753d5ca451d1565 /src/extension/internal/gdkpixbuf-input.cpp
parentFixed a crash in modifying filter parameters in XML editor. (diff)
downloadinkscape-36a1242bc96b3afee539421ec2c38d9934dd5095.tar.gz
inkscape-36a1242bc96b3afee539421ec2c38d9934dd5095.zip
gboolean -> bool conversion commit 1. Modifies code to do with getting the undo system to ignore actions, as well as
SVG/XML save/load. Shouldn't cause problems though. (bzr r1639)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp5
1 files changed, 3 insertions, 2 deletions
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");
}