diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-10-11 03:34:08 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-10-11 03:34:08 +0000 |
| commit | 05c9f6824d14012a71528bd204bcdd4e6624db29 (patch) | |
| tree | 3df43f36edb9c89ba3ffce431c81b0e16e322b4e /src/file.cpp | |
| parent | Fix for 246153 : Broken style indicator (diff) | |
| download | inkscape-05c9f6824d14012a71528bd204bcdd4e6624db29.tar.gz inkscape-05c9f6824d14012a71528bd204bcdd4e6624db29.zip | |
Fix for 426763 : Cancelling import leads to error message
(bzr r11777)
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp index 778306d5d..a03c459da 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -235,12 +235,16 @@ bool sp_file_open(const Glib::ustring &uri, } SPDocument *doc = NULL; + bool cancelled = false; try { doc = Inkscape::Extension::open(key, uri.c_str()); } catch (Inkscape::Extension::Input::no_extension_found &e) { doc = NULL; } catch (Inkscape::Extension::Input::open_failed &e) { doc = NULL; + } catch (Inkscape::Extension::Input::open_cancelled &e) { + doc = NULL; + cancelled = true; } if (desktop) { @@ -287,7 +291,7 @@ bool sp_file_open(const Glib::ustring &uri, } return TRUE; - } else { + } else if (!cancelled) { gchar *safeUri = Inkscape::IO::sanitizeString(uri.c_str()); gchar *text = g_strdup_printf(_("Failed to load the requested file %s"), safeUri); sp_ui_error_dialog(text); @@ -295,6 +299,8 @@ bool sp_file_open(const Glib::ustring &uri, g_free(safeUri); return FALSE; } + + return FALSE; } /** |
