From: cilix42 Date: Mon, 18 Aug 2008 00:41:18 +0000 (+0000) Subject: Add option do deactivate knotholder handles for LPEs (useful if they interfere with... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef53f0fc099b3b84dd63ebb43daceb518a9ed8df;p=inkscape.git Add option do deactivate knotholder handles for LPEs (useful if they interfere with node handles during editing); doesn't live update the ShapeEditor at the moment --- diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 705ecede8..4a71b2656 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -252,6 +252,7 @@ Effect::createAndApply(EffectType type, SPDocument *doc, SPItem *item) Effect::Effect(LivePathEffectObject *lpeobject) : oncanvasedit_it(0), is_visible(_("Is visible?"), _("If unchecked, the effect remains applied to the object but is temporarily disabled on canvas"), "is_visible", &wr, this, true), + deactivate_knotholder(_("Deactivate knotholder?"), _("Check this to deactivate knotholder handles (useful if they interfere with node handles during editing)"), "deactivate_knotholder", &wr, this, false), show_orig_path(false), lpeobj(lpeobject), concatenate_before_pwd2(false), @@ -259,6 +260,7 @@ Effect::Effect(LivePathEffectObject *lpeobject) is_ready(false) // is automatically set to false if providesOwnFlashPaths() is not overridden { registerParameter( dynamic_cast(&is_visible) ); + registerParameter( dynamic_cast(&deactivate_knotholder) ); } Effect::~Effect() @@ -449,6 +451,9 @@ void Effect::addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { using namespace Inkscape::LivePathEffect; + if (deactivate_knotholder) + return; + // add handles provided by the effect itself addKnotHolderEntities(knotholder, desktop, item); diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index a66073881..609778b46 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -185,6 +185,9 @@ protected: std::vector > kh_entity_vector; int oncanvasedit_it; BoolParam is_visible; + BoolParam deactivate_knotholder; // the user can use this to deactivate knotholders (for + // convenience, because they may interfere with node handles + // during editing); this is probably only temporary bool show_orig_path; // set this to true in derived effects to automatically have the original // path displayed as helperpath