summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/live_effects/parameter/path.cpp11
-rw-r--r--src/ui/dialog/symbols.cpp7
2 files changed, 12 insertions, 6 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index f89fad3ee..7dcd85df9 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -277,10 +277,13 @@ PathParam::param_editOncanvas(SPItem *item, SPDesktop * dt)
r.item = reinterpret_cast<SPItem*>(param_effect->getLPEObj());
r.lpe_key = param_key;
Geom::PathVector stored_pv = _pathvector;
- param_write_to_repr("M0,0 L1,0");
- gchar *svgd = sp_svg_write_path(stored_pv);
- param_write_to_repr(svgd);
- g_free(svgd);
+ if (_pathvector.empty()) {
+ param_write_to_repr("M0,0 L1,0");
+ } else {
+ gchar *svgd = sp_svg_write_path(stored_pv);
+ param_write_to_repr(svgd);
+ g_free(svgd);
+ }
} else {
r.item = ref.getObject();
}
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.*?>(.*?)<(/| /)");