From 18619e3328e070c5d59f12c4d19fa09713fc4700 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 29 May 2017 04:23:48 +0200 Subject: Handling hide (bzr r15706) --- src/sp-clippath.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/sp-clippath.cpp') diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index b371e15b2..16b769d53 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -35,7 +35,6 @@ struct SPClipPathView { Inkscape::DrawingItem *arenaitem; Geom::OptRect bbox; }; - static SPClipPathView* sp_clippath_view_new_prepend(SPClipPathView *list, unsigned int key, Inkscape::DrawingItem *arenaitem); static SPClipPathView* sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view); @@ -227,15 +226,20 @@ void SPClipPath::hide(unsigned int key) { SP_ITEM(&child)->invoke_hide(key); } } - + bool is_hided = false; for (SPClipPathView *v = display; v != NULL; v = v->next) { + if (!v->arenaitem->getClip()) { + is_hided = true; + } if (v->key == key) { /* We simply unref and let item to manage this in handler */ display = sp_clippath_view_list_remove(display, v); return; } } - + if (is_hided) { + return; + } g_assert_not_reached(); } -- cgit v1.2.3 From 38d796905f3b0e467d9e653c51f2993870f033cf Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 29 May 2017 17:33:21 +0200 Subject: Allow temp hide clip (bzr r15707) --- src/sp-clippath.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/sp-clippath.cpp') diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 16b769d53..619f7c65e 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -226,18 +226,16 @@ void SPClipPath::hide(unsigned int key) { SP_ITEM(&child)->invoke_hide(key); } } - bool is_hided = false; + bool no_clippathview = true; for (SPClipPathView *v = display; v != NULL; v = v->next) { - if (!v->arenaitem->getClip()) { - is_hided = true; - } + no_clippathview = false; if (v->key == key) { /* We simply unref and let item to manage this in handler */ display = sp_clippath_view_list_remove(display, v); return; } } - if (is_hided) { + if (no_clippathview) { return; } g_assert_not_reached(); -- cgit v1.2.3 From 15adf7b6003d6956e38ccf42a65d0e883bac2731 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 29 May 2017 19:26:57 +0200 Subject: Add toggle clip bisibility button (bzr r15709) --- src/sp-clippath.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sp-clippath.cpp') diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 619f7c65e..b26a2cbf2 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -35,6 +35,7 @@ struct SPClipPathView { Inkscape::DrawingItem *arenaitem; Geom::OptRect bbox; }; + static SPClipPathView* sp_clippath_view_new_prepend(SPClipPathView *list, unsigned int key, Inkscape::DrawingItem *arenaitem); static SPClipPathView* sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view); -- cgit v1.2.3 From 4e4f45e65c6cfca497972e996a57c2503e3bf4ce Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 31 May 2017 21:21:51 +0200 Subject: Remove silly code ;) (bzr r15714) --- src/sp-clippath.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/sp-clippath.cpp') diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index b26a2cbf2..1829837d8 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -227,19 +227,13 @@ void SPClipPath::hide(unsigned int key) { SP_ITEM(&child)->invoke_hide(key); } } - bool no_clippathview = true; for (SPClipPathView *v = display; v != NULL; v = v->next) { - no_clippathview = false; if (v->key == key) { /* We simply unref and let item to manage this in handler */ display = sp_clippath_view_list_remove(display, v); return; } } - if (no_clippathview) { - return; - } - g_assert_not_reached(); } void SPClipPath::setBBox(unsigned int key, Geom::OptRect const &bbox) { -- cgit v1.2.3