X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-shape.cpp;h=cfeee3a29be1b33ad30073cc7c3d38d058a34317;hb=090b64622aefb974887ffe27031360a5022acc99;hp=a38a10b4d954286dcd4cd1f79f2c346463d0bc3e;hpb=dd69425007680aafc47fdd994e1985625571d252;p=inkscape.git diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index a38a10b4d..cfeee3a29 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -238,13 +238,15 @@ sp_shape_update (SPObject *object, SPCtx *ctx, unsigned int flags) if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_PARENT_MODIFIED_FLAG)) { /* This is suboptimal, because changing parent style schedules recalculation */ /* But on the other hand - how can we know that parent does not tie style and transform */ - NR::Rect const paintbox = SP_ITEM(object)->invokeBbox(NR::identity()); + NR::Maybe paintbox = SP_ITEM(object)->getBounds(NR::identity()); for (SPItemView *v = SP_ITEM (shape)->display; v != NULL; v = v->next) { NRArenaShape * const s = NR_ARENA_SHAPE(v->arenaitem); if (flags & SP_OBJECT_MODIFIED_FLAG) { nr_arena_shape_set_path(s, shape->curve, (flags & SP_OBJECT_USER_MODIFIED_FLAG_B)); } - s->setPaintBox(paintbox); + if (paintbox) { + s->setPaintBox(*paintbox); + } } } @@ -753,8 +755,10 @@ sp_shape_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flag NRArenaShape * const s = NR_ARENA_SHAPE(arenaitem); nr_arena_shape_set_style(s, object->style); nr_arena_shape_set_path(s, shape->curve, false); - NR::Rect const paintbox = item->invokeBbox(NR::identity()); - s->setPaintBox(paintbox); + NR::Maybe paintbox = item->getBounds(NR::identity()); + if (paintbox) { + s->setPaintBox(*paintbox); + } if (sp_shape_has_markers (shape)) {