diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-04 19:06:34 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-04 19:06:34 +0000 |
| commit | 06b346c6b592e8a0d9609e42c5a509ee9ebe519b (patch) | |
| tree | d11771089b02bc74843859851025824a6d8ac3b9 /src/sp-shape.cpp | |
| parent | replace use of invokeBbox in flood fill tool (diff) | |
| download | inkscape-06b346c6b592e8a0d9609e42c5a509ee9ebe519b.tar.gz inkscape-06b346c6b592e8a0d9609e42c5a509ee9ebe519b.zip | |
adapt code to new Maybe/bbox regime
(bzr r2538)
Diffstat (limited to 'src/sp-shape.cpp')
| -rw-r--r-- | src/sp-shape.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 7d472088c..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)->getBounds(NR::identity()); + NR::Maybe<NR::Rect> 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->getBounds(NR::identity()); - s->setPaintBox(paintbox); + NR::Maybe<NR::Rect> paintbox = item->getBounds(NR::identity()); + if (paintbox) { + s->setPaintBox(*paintbox); + } if (sp_shape_has_markers (shape)) { |
