[gnumeric] Fix in-cell editing when zoom < 100%. [#662679]



commit 54c094a21e72577d4d1880cae93c091cd6bf8a57
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Aug 12 08:23:36 2010 +0200

    Fix in-cell editing when zoom < 100%. [#662679]

 ChangeLog       |    5 +++++
 NEWS            |    1 +
 src/item-edit.c |    4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3dfdbbb..4651745 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-12  Jean Brefort  <jean brefort normalesup org>
+
+	* src/item-edit.c (item_edit_update_bounds): fix in-cell editing when
+	zoom < 100%. [#626679]
+
 2010-08-11  Morten Welinder  <terra gnome org>
 
 	* src/xml-sax-read.c (xml_sax_colrow): Set "pos" initially.
diff --git a/NEWS b/NEWS
index c8d061c..19e2935 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ Jean:
 	* Fix scroll when selecting a merged cell. [#626065]
 	* Fix objects dragging when zoomed. [#626484]
 	* Fix control points behavior when zooming.
+	* Fix in-cell editing when zoom < 100%. [#662679] 
 
 Morten:
 	* Survive malformed xml files.
diff --git a/src/item-edit.c b/src/item-edit.c
index 3210907..11e9c80 100644
--- a/src/item-edit.c
+++ b/src/item-edit.c
@@ -435,7 +435,7 @@ item_edit_update_bounds (GocItem *item)
 				if (ci->visible)
 					col_size += ci->size_pixels;
 			}
-			tmp = pane->first_offset.x + canvas->allocation.width;
+			tmp = (pane->first_offset.x + canvas->allocation.width) / scale;
 			item->x1 = item->x0 + (col_size + GNM_COL_MARGIN + GNM_COL_MARGIN + 1) / scale;
 
 			if (item->x1 >= tmp) {
@@ -460,7 +460,7 @@ item_edit_update_bounds (GocItem *item)
 			}
 			if (col_size < width)
 				col_size = width;
-			tmp = pane->first_offset.x;
+			tmp = pane->first_offset.x / scale;
 			item->x0 = item->x1 - (col_size + GNM_COL_MARGIN + GNM_COL_MARGIN + 1) / scale;
 			if (item->x0 <= tmp) {
 				item->x0 = tmp;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]