diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2008-08-03 05:16:01 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2008-08-03 05:16:01 +0000 |
| commit | fad5635007567aaab6efb20d6f976d88b0cc4181 (patch) | |
| tree | fab2f97adc4296b8d35d9868d39dd3434b381617 /src/live_effects/parameter/path.cpp | |
| parent | Replaced deprecated GtkType creation with GType (diff) | |
| download | inkscape-fad5635007567aaab6efb20d6f976d88b0cc4181.tar.gz inkscape-fad5635007567aaab6efb20d6f976d88b0cc4181.zip | |
Fixed broken empty string check
(bzr r6542)
Diffstat (limited to 'src/live_effects/parameter/path.cpp')
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index df329a10c..68cb5cd63 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -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 : @@ -381,14 +381,14 @@ PathParam::on_edit_button_click() 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 @@ -397,7 +397,7 @@ PathParam::on_paste_button_click() 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")); } @@ -429,7 +429,7 @@ PathParam::on_link_button_click() // 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")); } } |
