summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-01-07 23:18:14 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-01-07 23:18:14 +0000
commitff3ab41a151ce87c6d73625e98adc23bdfb40a37 (patch)
tree15dd9664ea54ed55ddaeae0c137c61423d9412c0 /src/ui
parentUpdate symbols README to match changes to symbol file parsing. (diff)
downloadinkscape-ff3ab41a151ce87c6d73625e98adc23bdfb40a37.tar.gz
inkscape-ff3ab41a151ce87c6d73625e98adc23bdfb40a37.zip
Fix a problem with symbols when updating defs with current document set. Also fix a double XML write in path parameter unnecesary
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/symbols.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index 4fc9f4866..623c45605 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -373,7 +373,6 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
// This might need to be a global variable so setTargetDesktop can modify it
SPDefs *defs = current_document->getDefs();
-
sigc::connection defsModifiedConn = defs->connectModified(sigc::mem_fun(*this, &SymbolsDialog::defsModified));
instanceConns.push_back(defsModifiedConn);
@@ -852,6 +851,11 @@ void SymbolsDialog::getSymbolsTitle() {
std::pair<Glib::ustring, SPDocument*>
SymbolsDialog::getSymbolsSet(Glib::ustring title)
{
+ SPDocument* symbol_doc = NULL;
+ Glib::ustring current = symbol_set->get_active_text();
+ if (current == CURRENTDOC) {
+ return std::make_pair(CURRENTDOC, symbol_doc);
+ }
if (symbol_sets[title]) {
sensitive = false;
symbol_set->remove_all();
@@ -867,7 +871,6 @@ SymbolsDialog::getSymbolsSet(Glib::ustring title)
return std::make_pair(title, symbol_sets[title]);
}
using namespace Inkscape::IO::Resource;
- SPDocument* symbol_doc = NULL;
Glib::ustring new_title;
std::regex matchtitle (".*?<title.*?>(.*?)<(/| /)");