From 8bd8486dc468d6c41b84013c60d9592146851ff8 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Sat, 12 Sep 2015 08:40:47 +0200 Subject: Export. Fix for bug #170295 (default export image name for not-saved drawings). Fixed bugs: - https://launchpad.net/bugs/170295 (bzr r14357) --- src/ui/dialog/export.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ui/dialog/export.cpp') diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index 1edfdfe80..59fab7771 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -474,7 +474,14 @@ void Export::set_default_filename () { doc_export_name = filename_entry.get_text(); } + else if ( SP_ACTIVE_DOCUMENT ) + { + Glib::ustring filename = create_filepath_from_id (_("bitmap"), filename_entry.get_text()); + filename_entry.set_text(filename); + filename_entry.set_position(filename.length()); + doc_export_name = filename_entry.get_text(); + } } #if WITH_GTKMM_3_0 -- cgit v1.2.3 From 23935ad410a79d6f82e0ce90e5efba32a55cda4c Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Thu, 5 Nov 2015 22:27:44 +0100 Subject: static code analysis (bzr r14446) --- src/ui/dialog/export.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/dialog/export.cpp') diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index 59fab7771..2fb5f9e3b 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -821,7 +821,7 @@ void Export::onAreaToggled () if (filename.empty()) { const gchar * id = "object"; const std::vector reprlst = SP_ACTIVE_DESKTOP->getSelection()->reprList(); - for(std::vector::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) { + for(std::vector::const_iterator i=reprlst.begin(); reprlst.end() != i; ++i) { Inkscape::XML::Node * repr = *i; if (repr->attribute("id")) { id = repr->attribute("id"); @@ -1030,7 +1030,7 @@ void Export::onExport () gint export_count = 0; std::vector itemlist=desktop->getSelection()->itemList(); - for(std::vector::const_iterator i = itemlist.begin();i!=itemlist.end() && !interrupted ;i++){ + for(std::vector::const_iterator i = itemlist.begin();i!=itemlist.end() && !interrupted ;++i){ SPItem *item = *i; prog_dlg->set_data("current", GINT_TO_POINTER(n)); @@ -1239,7 +1239,7 @@ void Export::onExport () DocumentUndo::setUndoSensitive(doc, false); reprlst = desktop->getSelection()->reprList(); - for(std::vector::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) { + for(std::vector::const_iterator i=reprlst.begin(); reprlst.end() != i; ++i) { Inkscape::XML::Node * repr = *i; const gchar * temp_string; Glib::ustring dir = Glib::path_get_dirname(filename.c_str()); -- cgit v1.2.3