From 79d2d04dba2b780a696e1872891dc92983cfc2dd Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 23 Oct 2010 22:40:34 +0200 Subject: Fix updating for ellipses when viewbox is not defined Fixed bugs: - https://launchpad.net/bugs/587897 (bzr r9844) --- src/sp-ellipse.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 88fc59f17..dbc5b1407 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -144,16 +144,18 @@ sp_genericellipse_update(SPObject *object, SPCtx *ctx, guint flags) SPGenericEllipse *ellipse = (SPGenericEllipse *) object; SPStyle const *style = object->style; Geom::OptRect viewbox = ((SPItemCtx const *) ctx)->vp; - double const dx = viewbox->width(); - double const dy = viewbox->height(); - double const dr = sqrt(dx*dx + dy*dy)/sqrt(2); - double const em = style->font_size.computed; - double const ex = em * 0.5; // fixme: get from pango or libnrtype - ellipse->cx.update(em, ex, dx); - ellipse->cy.update(em, ex, dy); - ellipse->rx.update(em, ex, dr); - ellipse->ry.update(em, ex, dr); - sp_shape_set_shape((SPShape *) object); + if (viewbox) { + double const dx = viewbox->width(); + double const dy = viewbox->height(); + double const dr = sqrt(dx*dx + dy*dy)/sqrt(2); + double const em = style->font_size.computed; + double const ex = em * 0.5; // fixme: get from pango or libnrtype + ellipse->cx.update(em, ex, dx); + ellipse->cy.update(em, ex, dy); + ellipse->rx.update(em, ex, dr); + ellipse->ry.update(em, ex, dr); + sp_shape_set_shape((SPShape *) object); + } } if (((SPObjectClass *) ge_parent_class)->update) -- cgit v1.2.3 From 144819c918dc761641c3cb5a490205fb73194ee3 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 17 Nov 2010 13:12:56 +1100 Subject: Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in all 1074 Vim modelines. The reason for this is that (a) setting the encoding isn't nice, and (b) Vim 7.3 (with modeline enabled) disallows it and pops up an error whenever you open any file with it ("invalid modeline"). Also corrected five deviant modestrings: * src/ui/widget/dock.cpp and src/ui/widget/dock.h: missing colon at the end * src/ui/dialog/tile.cpp: removed gratuitous second colon at the end * src/helper/units-test.h: removed gratuitous space before a colon * share/extensions/export_gimp_palette.py: missing textwidth=99 That's my geekiest commit yet. (bzr r9900) --- src/sp-ellipse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index dbc5b1407..d2472c914 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -925,4 +925,4 @@ Geom::Point sp_arc_get_xy(SPArc *arc, gdouble arg) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : -- cgit v1.2.3