From: joncruz Date: Sun, 3 Aug 2008 05:16:01 +0000 (+0000) Subject: Fixed broken empty string check X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c302f0db7d9bf24bbaa6aca555fa74ce23866975;p=inkscape.git Fixed broken empty string check --- 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 > 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")); } }