[gnumeric] 2010-08-10 Jean Brefort <jean brefort normalesup org>
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] 2010-08-10 Jean Brefort <jean brefort normalesup org>
- Date: Tue, 10 Aug 2010 08:04:12 +0000 (UTC)
commit 25b011884174876477189497d30d415b03302329
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Aug 10 10:04:58 2010 +0200
2010-08-10 Jean Brefort <jean brefort normalesup org>
* src/gnm-pane-impl.h: update comment.
* src/gnm-pane.c (cb_pane_drag_motion): fixed objects dragging when zoomed.
[#626484]
* src/sheet-control-gui.c (scg_drag_receive_same_process): ditto.
ChangeLog | 7 +++++++
NEWS | 1 +
src/gnm-pane-impl.h | 2 +-
src/gnm-pane.c | 6 ++++--
src/sheet-control-gui.c | 6 ++++--
5 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 54d0e12..9b2bea3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-10 Jean Brefort <jean brefort normalesup org>
+
+ * src/gnm-pane-impl.h: update comment.
+ * src/gnm-pane.c (cb_pane_drag_motion): fixed objects dragging when zoomed.
+ [#626484]
+ * src/sheet-control-gui.c (scg_drag_receive_same_process): ditto.
+
2010-08-08 Morten Welinder <terra gnome org>
* src/xml-sax-read.c (xml_sax_must_have_style): New function. Use
diff --git a/NEWS b/NEWS
index 2367b43..fe08063 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Jean:
* Force column span recalculation when switching between number and
error. [#625994]
* Fix scroll when selecting a merged cell. [#626065]
+ * Fix objecs dragging when zoomed. [#626484]
Morten:
* Survive malformed xml files.
diff --git a/src/gnm-pane-impl.h b/src/gnm-pane-impl.h
index 47ae6c8..66edb13 100644
--- a/src/gnm-pane-impl.h
+++ b/src/gnm-pane-impl.h
@@ -70,7 +70,7 @@ struct _GnmPane {
int button; /* the button that intiated the object drag */
gboolean created_objects;
gboolean had_motion; /* while dragging did we actually move */
- GHashTable *ctrl_pts; /* arrays of FooCanvasItems hashed by sheet object */
+ GHashTable *ctrl_pts; /* arrays of GocItems hashed by sheet object */
double last_x, last_y, origin_x, origin_y;
} drag;
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 5df4bf8..174461a 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -1056,13 +1056,15 @@ cb_pane_drag_motion (GtkWidget *widget, GdkDragContext *context,
if ((IS_GNM_PANE (source_widget) &&
GNM_PANE (source_widget)->simple.scg == scg)) {
/* same scg */
- GnmPane *pane = GNM_PANE (widget);
+ GocCanvas *canvas = GOC_CANVAS (widget);
GdkModifierType mask;
double wx, wy;
g_object_set_data (&context->parent_instance,
"wbcg", scg_wbcg (scg));
- goc_canvas_w2c (GOC_CANVAS (pane), x, y, &wx, &wy);
+ goc_canvas_w2c (canvas, x, y, &wx, &wy);
+ wx *= goc_canvas_get_pixels_per_unit (canvas);
+ wy *= goc_canvas_get_pixels_per_unit (canvas);
gdk_window_get_pointer (gtk_widget_get_parent_window (source_widget),
NULL, NULL, &mask);
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index a004096..84883ba 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -3796,12 +3796,14 @@ scg_drag_receive_same_process (SheetControlGUI *scg, GtkWidget *source_widget,
g_return_if_fail (IS_GNM_PANE (source_widget));
pane = GNM_PANE (source_widget);
+ x *= goc_canvas_get_pixels_per_unit (GOC_CANVAS (pane));
+ y *= goc_canvas_get_pixels_per_unit (GOC_CANVAS (pane));
source_scg = pane->simple.scg;
if (source_scg == scg) {
GdkWindow *window;
GdkModifierType mask;
- int xx = x, yy = y;
- int origin_x = 0, origin_y = 0;
+ gint64 xx = x, yy = y;
+ gint64 origin_x = 0, origin_y = 0;
gboolean make_dup;
GOUndo *undo = NULL;
GOUndo *redo = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]