[dia] Flowchart textfitting change was breaking in unit test
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Flowchart textfitting change was breaking in unit test
- Date: Sat, 21 Jul 2012 16:00:26 +0000 (UTC)
commit b538a18760c2d040320ef8d1e7dc35f431ca6388
Author: Hans Breuer <hans breuer org>
Date: Sat Jul 21 18:53:30 2012 +0200
Flowchart textfitting change was breaking in unit test
The condidition to grow the ellipse was apply too eagerly.
objects/flowchart/ellipse.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/objects/flowchart/ellipse.c b/objects/flowchart/ellipse.c
index c56c103..8d0fc3a 100644
--- a/objects/flowchart/ellipse.c
+++ b/objects/flowchart/ellipse.c
@@ -400,9 +400,9 @@ ellipse_update_data(Ellipse *ellipse, AnchorShape horiz, AnchorShape vert)
radius1 = ellipse_radius(ellipse, p.x, p.y) - ellipse->border_width/2;
radius2 = distance_point_point(&c, &p);
- if ( ellipse->text_fitting == TEXTFIT_ALWAYS
- || ( ellipse->text_fitting == TEXTFIT_WHEN_NEEDED
- && radius1 < radius2)) {
+ if ( radius1 < radius2
+ && ( ellipse->text_fitting == TEXTFIT_ALWAYS
+ || ellipse->text_fitting == TEXTFIT_WHEN_NEEDED)) {
/* increase size of the ellipse while keeping its aspect ratio */
elem->width *= radius2 / radius1;
elem->height *= radius2 / radius1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]