Commit 25b01188 authored by Jean Bréfort's avatar Jean Bréfort

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.
parent 6deaff97
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
......
......@@ -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.
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment