diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-10 20:54:38 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-10 20:54:38 +0000 |
| commit | a99764de718f7331615d3f9449e10a56dee62fb6 (patch) | |
| tree | d60bc8389777a4384b8c931867a93c6491fffee5 /src/text-context.cpp | |
| parent | fix setting knot->pos for node handles, but remove coords updating - now done... (diff) | |
| download | inkscape-a99764de718f7331615d3f9449e10a56dee62fb6.tar.gz inkscape-a99764de718f7331615d3f9449e10a56dee62fb6.zip | |
Merge further bbox work
(bzr r2596)
Diffstat (limited to 'src/text-context.cpp')
| -rw-r--r-- | src/text-context.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp index b65bcf19f..6a527e544 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -436,7 +436,10 @@ sp_text_context_item_handler(SPEventContext *ec, SPItem *item, GdkEvent *event) item_ungrouped = desktop->item_at_point(NR::Point(event->button.x, event->button.y), TRUE); if (SP_IS_TEXT(item_ungrouped) || SP_IS_FLOWTEXT(item_ungrouped)) { sp_canvas_item_show(tc->indicator); - SP_CTRLRECT(tc->indicator)->setRectangle(sp_item_bbox_desktop(item_ungrouped)); + NR::Maybe<NR::Rect> ibbox = sp_item_bbox_desktop(item_ungrouped); + if (ibbox) { + SP_CTRLRECT(tc->indicator)->setRectangle(*ibbox); + } ec->cursor_shape = cursor_text_insert_xpm; ec->hot_x = 7; @@ -1458,7 +1461,10 @@ sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see) SPItem *frame = SP_FLOWTEXT(tc->text)->get_frame (NULL); // first frame only if (frame) { sp_canvas_item_show(tc->frame); - SP_CTRLRECT(tc->frame)->setRectangle(sp_item_bbox_desktop(frame)); + NR::Maybe<NR::Rect> frame_bbox = sp_item_bbox_desktop(frame); + if (frame_bbox) { + SP_CTRLRECT(tc->frame)->setRectangle(*frame_bbox); + } } SP_EVENT_CONTEXT(tc)->_message_context->set(Inkscape::NORMAL_MESSAGE, _("Type flowed text; <b>Enter</b> to start new paragraph.")); } else { |
