From 9e21d00fb1053897420f80d05a9815c5b2bbf312 Mon Sep 17 00:00:00 2001 From: mc <> Date: Wed, 18 Feb 2015 11:25:23 +0100 Subject: I can't really understand why, but i can now launch inkscape without it segfaulting. That's an improvement. Next thing: code cleaning, replacing containers with vectors (bzr r13922.1.4) --- src/ui/dialog/export.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui/dialog/export.cpp') diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index fc6094c9f..0667ba721 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -817,9 +817,9 @@ void Export::onAreaToggled () one that's nice */ if (filename.empty()) { const gchar * id = "object"; - const SelContainer reprlst = SP_ACTIVE_DESKTOP->getSelection()->reprList(); - for(SelContainer::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) { - Inkscape::XML::Node * repr = (Inkscape::XML::Node *)(*i); + const std::vector reprlst = SP_ACTIVE_DESKTOP->getSelection()->reprList(); + 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"); break; @@ -1226,7 +1226,7 @@ void Export::onExport () break; } case SELECTION_SELECTION: { - SelContainer reprlst; + std::vector reprlst; SPDocument * doc = SP_ACTIVE_DOCUMENT; bool modified = false; @@ -1234,8 +1234,8 @@ void Export::onExport () DocumentUndo::setUndoSensitive(doc, false); reprlst = desktop->getSelection()->reprList(); - for(SelContainer::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) { - Inkscape::XML::Node * repr = dynamic_cast(*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()); const gchar* docURI=SP_ACTIVE_DOCUMENT->getURI(); -- cgit v1.2.3