summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f14407d)
raw | patch | inline | side by side (parent: f14407d)
author | joncruz <joncruz@users.sourceforge.net> | |
Sun, 3 Aug 2008 05:16:01 +0000 (05:16 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sun, 3 Aug 2008 05:16:01 +0000 (05:16 +0000) |
src/live_effects/parameter/path.cpp | patch | blob | history |
index df329a10c5c6df38c7e36766bd51d4495798e779..68cb5cd633bcc98b6f02c75aaf0d29988895b61f 100644 (file)
@@ -259,7 +259,7 @@ PathParam::set_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & newpa
}
/*
- * This method sets new path data.
+ * This method sets new path data.
* If this PathParam refers to another path, this link is removed (and replaced with explicit path data).
*
* If write_to_svg = true :
void
PathParam::paste_param_path(const char *svgd)
{
- if (svgd == "")
- return;
-
- // remove possible link to path
- remove_link();
+ // only recognize a non-null, non-empty string
+ if (svgd && *svgd) {
+ // remove possible link to path
+ remove_link();
- param_write_to_repr(svgd);
- signal_path_pasted.emit();
+ param_write_to_repr(svgd);
+ signal_path_pasted.emit();
+ }
}
void
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
Glib::ustring svgd = cm->getPathParameter();
paste_param_path(svgd.data());
- sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
+ sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
_("Paste path parameter"));
}
// check if linking to object to which LPE is applied (maybe delegated to PathReference
param_write_to_repr(pathid.c_str());
- sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
+ sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
_("Link path parameter to path"));
}
}