From 4dd33aa4d5c57706c7f64f63391174954160a308 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 6 Aug 2011 14:18:32 +0200 Subject: Rewrite NRArenaItem hierarchy into C++ (bzr r10347.1.21) --- src/document.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 5bcf1bf40..64f4ea92a 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -44,7 +44,7 @@ #include "desktop.h" #include "dir-util.h" -#include "display/nr-arena-item.h" +#include "display/drawing-item.h" #include "document-private.h" #include "helper/units.h" #include "inkscape-private.h" @@ -1113,8 +1113,8 @@ SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *gro for ( SPObject *o = group->firstChild() ; o && !bottomMost; o = o->getNext() ) { if ( SP_IS_ITEM(o) ) { SPItem *item = SP_ITEM(o); - NRArenaItem *arenaitem = item->get_arenaitem(dkey); - if (arenaitem && nr_arena_item_invoke_pick(arenaitem, p, delta, 1) != NULL + Inkscape::DrawingItem *arenaitem = item->get_arenaitem(dkey); + if (arenaitem && arenaitem->pick(p, delta, 1) != NULL && (take_insensitive || item->isVisibleAndUnlocked(dkey))) { if (g_slist_find((GSList *) list, item) != NULL) { bottomMost = item; @@ -1167,10 +1167,10 @@ SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point const } } else { SPItem *child = SP_ITEM(o); - NRArenaItem *arenaitem = child->get_arenaitem(dkey); + Inkscape::DrawingItem *arenaitem = child->get_arenaitem(dkey); // seen remembers the last (topmost) of items pickable at this point - if (arenaitem && nr_arena_item_invoke_pick(arenaitem, p, delta, 1) != NULL + if (arenaitem && arenaitem->pick(p, delta, 1) != NULL && (take_insensitive || child->isVisibleAndUnlocked(dkey))) { seen = child; } @@ -1201,10 +1201,10 @@ SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Point const } if (SP_IS_GROUP(o) && SP_GROUP(o)->effectiveLayerMode(dkey) != SPGroup::LAYER ) { SPItem *child = SP_ITEM(o); - NRArenaItem *arenaitem = child->get_arenaitem(dkey); + Inkscape::DrawingItem *arenaitem = child->get_arenaitem(dkey); // seen remembers the last (topmost) of groups pickable at this point - if (arenaitem && nr_arena_item_invoke_pick(arenaitem, p, delta, 1) != NULL) { + if (arenaitem && arenaitem->pick(p, delta, 1) != NULL) { seen = child; } } -- cgit v1.2.3