summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-12-04 20:03:34 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-12-04 20:03:34 +0000
commit6ca82eefca28c0c891b8a7d0e3effa82d20efd83 (patch)
treefac15edcc20d4fe48248ed5973263010cd93734a /src
parentChange title of tab in document properties dialog ("Snap details" -> "Snap po... (diff)
downloadinkscape-6ca82eefca28c0c891b8a7d0e3effa82d20efd83.tar.gz
inkscape-6ca82eefca28c0c891b8a7d0e3effa82d20efd83.zip
Don't show error dialog when bitmap export is cancelled by the user (fixes bug #172338)
(bzr r4170)
Diffstat (limited to 'src')
-rw-r--r--src/helper/png-write.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp
index 6feefec7d..2128abd39 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -289,7 +289,7 @@ hide_other_items_recursively(SPObject *o, GSList *list, unsigned dkey)
/**
* Export the given document as a Portable Network Graphics (PNG) file.
*
- * \return true if succeeded, false if an error occurred.
+ * \return true if succeeded (or if no action was taken), false if an error occurred.
*/
bool
sp_export_png_file(SPDocument *doc, gchar const *filename,
@@ -306,7 +306,11 @@ sp_export_png_file(SPDocument *doc, gchar const *filename,
g_return_val_if_fail(height >= 1, false);
if (!force_overwrite && !sp_ui_overwrite_file(filename)) {
- return false;
+ /* Remark: We return true so as not to invoke an error dialog in case export is cancelled
+ by the user; currently this is safe because the callers only act when false is returned.
+ If this changes in the future we need better distinction of return types (e.g., use int)
+ */
+ return true;
}
// export with maximum blur rendering quality