From 19337e57f455c0d7e4da72b6b3f438e68d507256 Mon Sep 17 00:00:00 2001 From: cilix42 Date: Fri, 4 Jul 2008 11:23:25 +0000 Subject: [PATCH] Keep original path by default for LPEMirrorReflect --- src/live_effects/lpe-mirror_reflect.cpp | 5 +++++ src/live_effects/lpe-mirror_reflect.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/live_effects/lpe-mirror_reflect.cpp b/src/live_effects/lpe-mirror_reflect.cpp index 6a149dfc5..a501fbb8f 100644 --- a/src/live_effects/lpe-mirror_reflect.cpp +++ b/src/live_effects/lpe-mirror_reflect.cpp @@ -27,10 +27,12 @@ namespace LivePathEffect { LPEMirrorReflect::LPEMirrorReflect(LivePathEffectObject *lpeobject) : Effect(lpeobject), + discard_orig_path(_("Discard original path?"), _("Check this to only keep the mirrored part of the path"), "discard_orig_path", &wr, this, false), reflection_line(_("Reflection line"), _("Line which serves as 'mirror' for the reflection"), "reflection_line", &wr, this, "M0,0 L100,100") { show_orig_path = true; + registerParameter( dynamic_cast(&discard_orig_path) ); registerParameter( dynamic_cast(&reflection_line) ); } @@ -60,6 +62,9 @@ std::vector LPEMirrorReflect::doEffect_path (std::vector const & path_in) { std::vector path_out; + if (!discard_orig_path) { + path_out = path_in; + } std::vector mline(reflection_line.get_pathvector()); Geom::Point A(mline.front().initialPoint()); diff --git a/src/live_effects/lpe-mirror_reflect.h b/src/live_effects/lpe-mirror_reflect.h index 61745a439..4fd695e0e 100644 --- a/src/live_effects/lpe-mirror_reflect.h +++ b/src/live_effects/lpe-mirror_reflect.h @@ -34,6 +34,7 @@ public: virtual std::vector doEffect_path (std::vector const & path_in); private: + BoolParam discard_orig_path; PathParam reflection_line; LPEMirrorReflect(const LPEMirrorReflect&); -- 2.30.2