[gnumeric] Fixed arrows and line object position when zoomed. [#637453]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fixed arrows and line object position when zoomed. [#637453]
- Date: Fri, 17 Dec 2010 14:25:15 +0000 (UTC)
commit 69bebeb80a61428f27dc52031ed1181eec043afa
Author: Jean Brefort <jean brefort normalesup org>
Date: Fri Dec 17 15:23:35 2010 +0100
Fixed arrows and line object position when zoomed. [#637453]
ChangeLog | 5 +++++
NEWS | 1 +
src/gnm-so-line.c | 9 +++++----
3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e18a381..c52a119 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-17 Jean Brefort <jean brefort normalesup org>
+
+ * src/gnm-so-line.c (so_line_view_set_bounds): take zoom level into
+ account when setting the coordinates. [#637453]
+
2010-12-10 Morten Welinder <terra gnome org>
* src/stf.c (resize_columns): Expand columns to fit
diff --git a/NEWS b/NEWS
index 52741d3..4798ac7 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Andreas:
Jean:
* Only disable the formula bar when a chart sheet is selected. [#636031]
* Make sheet objects invisible outline from .xls files persistent. [#637393]
+ * Fixed arrows and line object position when zoomed. [#637453]
Morten:
* Fix array intersection problem with IF. [#633433]
diff --git a/src/gnm-so-line.c b/src/gnm-so-line.c
index 4e064e5..b6e3425 100644
--- a/src/gnm-so-line.c
+++ b/src/gnm-so-line.c
@@ -61,16 +61,17 @@ so_line_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean vi
GocItem *view = GOC_ITEM (sov), *item = GOC_ITEM (GOC_GROUP (view)->children->data);
SheetObject *so = sheet_object_view_get_so (sov);
GOStyleLine const *style = &GNM_SO_LINE (so)->style->line;
+ double scale = goc_canvas_get_pixels_per_unit (view->canvas);
sheet_object_direction_set (so, coords);
if (visible &&
style->color != 0 && style->width >= 0 && style->dash_type != GO_LINE_NONE) {
goc_item_set (item,
- "x0", coords[0],
- "y0", coords[1],
- "x1", coords[2],
- "y1", coords[3],
+ "x0", coords[0] / scale,
+ "y0", coords[1] / scale,
+ "x1", coords[2] / scale,
+ "y1", coords[3] / scale,
NULL);
goc_item_show (view);
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]