From 1f0a20e9f4270de3aff4b9ce0484e1d26c6d58da Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Fri, 8 Sep 2017 22:28:13 +0200 Subject: Fix for bug: 1715433 :: Clone original LPE can no longer be used to fill a powerstroke path --- src/live_effects/parameter/originalpatharray.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/live_effects/parameter/originalpatharray.h') diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h index fe9371644..eb1114c3f 100644 --- a/src/live_effects/parameter/originalpatharray.h +++ b/src/live_effects/parameter/originalpatharray.h @@ -70,6 +70,9 @@ public: virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {}; /** Disable the canvas indicators of parent class by overriding this method */ virtual void addCanvasIndicators(SPLPEItem const* /*lpeitem*/, std::vector & /*hp_vec*/) {}; + void setFromOriginalD(bool from_original_d){ _from_original_d = from_original_d; }; + void allowOnlyBsplineSpiro(bool allow_only_bspline_spiro){ _allow_only_bspline_spiro = allow_only_bspline_spiro; }; + std::vector _vector; protected: @@ -99,6 +102,8 @@ protected: void on_reverse_toggled(const Glib::ustring& path); private: + bool _from_original_d; + bool _allow_only_bspline_spiro; OriginalPathArrayParam(const OriginalPathArrayParam&); OriginalPathArrayParam& operator=(const OriginalPathArrayParam&); }; -- cgit v1.2.3 From 30faf29165b1bcd936e9e0ca3ecc8b4bad4c94d2 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 9 Sep 2017 03:54:39 +0200 Subject: This commit is based on a coment on bug #1670644. And allow to fill the fill between many LPE widget that allow attach all paths on the clipboard instead only one Also added to this widget the option visible, to allow work with multiples paths wigout getting full cracy --- src/live_effects/parameter/originalpatharray.h | 28 +++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/live_effects/parameter/originalpatharray.h') diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h index eb1114c3f..51810a5cf 100644 --- a/src/live_effects/parameter/originalpatharray.h +++ b/src/live_effects/parameter/originalpatharray.h @@ -28,13 +28,14 @@ namespace Inkscape { namespace LivePathEffect { -class PathAndDirection { +class PathAndDirectionAndVisible { public: - PathAndDirection(SPObject *owner) + PathAndDirectionAndVisible(SPObject *owner) : href(NULL), ref(owner), _pathvector(Geom::PathVector()), - reversed(false) + reversed(false), + visibled(true) { } @@ -42,6 +43,7 @@ public: URIReference ref; Geom::PathVector _pathvector; bool reversed; + bool visibled; sigc::connection linked_changed_connection; sigc::connection linked_delete_connection; @@ -73,25 +75,26 @@ public: void setFromOriginalD(bool from_original_d){ _from_original_d = from_original_d; }; void allowOnlyBsplineSpiro(bool allow_only_bspline_spiro){ _allow_only_bspline_spiro = allow_only_bspline_spiro; }; - std::vector _vector; + std::vector _vector; protected: - bool _updateLink(const Gtk::TreeIter& iter, PathAndDirection* pd); + bool _updateLink(const Gtk::TreeIter& iter, PathAndDirectionAndVisible* pd); bool _selectIndex(const Gtk::TreeIter& iter, int* i); - void unlink(PathAndDirection* to); - void remove_link(PathAndDirection* to); - void setPathVector(SPObject *linked_obj, guint flags, PathAndDirection* to); + void unlink(PathAndDirectionAndVisible* to); + void remove_link(PathAndDirectionAndVisible* to); + void setPathVector(SPObject *linked_obj, guint flags, PathAndDirectionAndVisible* to); - void linked_changed(SPObject *old_obj, SPObject *new_obj, PathAndDirection* to); - void linked_modified(SPObject *linked_obj, guint flags, PathAndDirection* to); - void linked_transformed(Geom::Affine const *, SPItem *, PathAndDirection*) {} - void linked_delete(SPObject *deleted, PathAndDirection* to); + void linked_changed(SPObject *old_obj, SPObject *new_obj, PathAndDirectionAndVisible* to); + void linked_modified(SPObject *linked_obj, guint flags, PathAndDirectionAndVisible* to); + void linked_transformed(Geom::Affine const *, SPItem *, PathAndDirectionAndVisible*) {} + void linked_delete(SPObject *deleted, PathAndDirectionAndVisible* to); ModelColumns *_model; Glib::RefPtr _store; Gtk::TreeView _tree; Gtk::CellRendererText *_text_renderer; Gtk::CellRendererToggle *_toggle_renderer; + Gtk::CellRendererToggle *_toggle_visible; Gtk::TreeView::Column *_name_column; Gtk::ScrolledWindow _scroller; @@ -100,6 +103,7 @@ protected: void on_up_button_click(); void on_down_button_click(); void on_reverse_toggled(const Glib::ustring& path); + void on_visible_toggled(const Glib::ustring& path); private: bool _from_original_d; -- cgit v1.2.3 From b5d3bcd190a8b4c95613eeb82e2b768b08b693ce Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Wed, 13 Sep 2017 17:10:44 +0200 Subject: Fixes for clone original LPE --- src/live_effects/parameter/originalpatharray.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/live_effects/parameter/originalpatharray.h') diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h index 51810a5cf..cffa2911f 100644 --- a/src/live_effects/parameter/originalpatharray.h +++ b/src/live_effects/parameter/originalpatharray.h @@ -72,11 +72,11 @@ public: virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {}; /** Disable the canvas indicators of parent class by overriding this method */ virtual void addCanvasIndicators(SPLPEItem const* /*lpeitem*/, std::vector & /*hp_vec*/) {}; - void setFromOriginalD(bool from_original_d){ _from_original_d = from_original_d; }; - void allowOnlyBsplineSpiro(bool allow_only_bspline_spiro){ _allow_only_bspline_spiro = allow_only_bspline_spiro; }; + void setFromOriginalD(bool from_original_d){ _from_original_d = from_original_d; update();}; + void allowOnlyBsplineSpiro(bool allow_only_bspline_spiro){ _allow_only_bspline_spiro = allow_only_bspline_spiro; update();}; std::vector _vector; - + protected: bool _updateLink(const Gtk::TreeIter& iter, PathAndDirectionAndVisible* pd); bool _selectIndex(const Gtk::TreeIter& iter, int* i); @@ -108,6 +108,7 @@ protected: private: bool _from_original_d; bool _allow_only_bspline_spiro; + void update(); OriginalPathArrayParam(const OriginalPathArrayParam&); OriginalPathArrayParam& operator=(const OriginalPathArrayParam&); }; -- cgit v1.2.3 From a474159bf7130e9b46a8da1efaf32e9eac4c55b7 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Thu, 21 Sep 2017 23:12:27 +0200 Subject: Fix for bug #1715433 Clone original LPE can no longer be used to fill a powerstroke path --- src/live_effects/parameter/originalpatharray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/live_effects/parameter/originalpatharray.h') diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h index cffa2911f..0ba6984c2 100644 --- a/src/live_effects/parameter/originalpatharray.h +++ b/src/live_effects/parameter/originalpatharray.h @@ -93,7 +93,7 @@ protected: Glib::RefPtr _store; Gtk::TreeView _tree; Gtk::CellRendererText *_text_renderer; - Gtk::CellRendererToggle *_toggle_renderer; + Gtk::CellRendererToggle *_toggle_reverse; Gtk::CellRendererToggle *_toggle_visible; Gtk::TreeView::Column *_name_column; Gtk::ScrolledWindow _scroller; -- cgit v1.2.3 From 1711a79b8604d9e6d936e25eaf966154ff122483 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Fri, 22 Sep 2017 18:00:59 +0200 Subject: Add tooltip to set default LPE widget --- src/live_effects/parameter/originalpatharray.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/live_effects/parameter/originalpatharray.h') diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h index 0ba6984c2..c80d5daf3 100644 --- a/src/live_effects/parameter/originalpatharray.h +++ b/src/live_effects/parameter/originalpatharray.h @@ -66,6 +66,7 @@ public: virtual Gtk::Widget * param_newWidget(); virtual bool param_readSVGValue(const gchar * strvalue); virtual gchar * param_getSVGValue() const; + virtual gchar * param_getDefaultSVGValue() const; virtual void param_set_default(); virtual void param_update_default(const gchar * default_value){}; /** Disable the canvas indicators of parent class by overriding this method */ -- cgit v1.2.3