[gnumeric] more canvas fixes
- From: Jean Bréfort <jbrefort src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] more canvas fixes
- Date: Sun, 30 Aug 2009 16:33:19 +0000 (UTC)
commit 537c0667f627dc51886a7b9e4f7381798064f27f
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Aug 30 18:32:18 2009 +0200
more canvas fixes
ChangeLog | 7 +++++++
src/gnm-pane.c | 2 ++
src/sheet-object.c | 17 +++++++++++++++--
3 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 21ad8e3..a7a7e94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-08-30 Jean Brefort <jean brefort normalesup org>
+ * src/gnm-pane.c (cb_bounds_changed): do not update while dragging.
+ * src/sheet-object.c (cb_create_views),
+ (sheet_object_view_enter_notify),
+ (sheet_object_view_button_pressed): do not reintroduce #151789.
+
+2009-08-30 Jean Brefort <jean brefort normalesup org>
+
* src/sheet-control-gui.c (scg_object_anchor_to_coords): fixed a
rounding error.
* src/sheet-object.c (sheet_object_clear_sheet),
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 6b6cfe0..b9fa9c5 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -2973,6 +2973,8 @@ cb_bounds_changed (SheetObject *so, GocItem *sov)
{
double coords[4], *cur;
SheetControlGUI *scg = GNM_SIMPLE_CANVAS (sov->canvas)->scg;
+ if (GNM_PANE (sov->canvas)->drag.button != 0)
+ return; /* do not reset bounds during drag */
scg_object_anchor_to_coords (scg, sheet_object_get_anchor (so), coords);
if (NULL != scg->selected_objects &&
diff --git a/src/sheet-object.c b/src/sheet-object.c
index 0f83228..9f363be 100644
--- a/src/sheet-object.c
+++ b/src/sheet-object.c
@@ -29,10 +29,12 @@
#include "gnm-pane-impl.h"
#include "gnm-so-line.h"
#include "gnm-so-filled.h"
+#include "sheet-control-gui-priv.h"
#include "sheet-object-cell-comment.h"
#include "sheet-object-widget.h"
#include "sheet-object-graph.h"
#include "sheet-object-image.h"
+#include "wbc-gtk-impl.h"
#include "graph.h"
#include <goffice/goffice.h>
#include "application.h"
@@ -335,7 +337,6 @@ cb_create_views (SheetObject *so)
g_object_set_data (G_OBJECT (so), "create_view_handler", NULL);
SHEET_FOREACH_CONTROL (so->sheet, view, control,
sc_object_create_view (control, so););
- sheet_object_update_bounds (so, NULL);
return FALSE;
}
@@ -1107,7 +1108,14 @@ sheet_object_view_get_so (SheetObjectView *view)
static gboolean
sheet_object_view_enter_notify (GocItem *item, double x, double y)
{
- SheetObject *so = (SheetObject *) g_object_get_qdata (G_OBJECT (item), sov_so_quark);
+ SheetObject *so;
+
+ if (scg_wbcg (GNM_SIMPLE_CANVAS (item->canvas)->scg)->new_object) {
+ ItemGrid *grid = GNM_PANE (item->canvas)->grid;
+ return GOC_ITEM_GET_CLASS (grid)->enter_notify (GOC_ITEM (grid), x, y);
+ }
+
+ so = (SheetObject *) g_object_get_qdata (G_OBJECT (item), sov_so_quark);
gnm_widget_set_cursor_type (GTK_WIDGET (item->canvas),
(so->flags & SHEET_OBJECT_CAN_PRESS) ? GDK_HAND2 : GDK_ARROW);
return FALSE;
@@ -1119,6 +1127,11 @@ sheet_object_view_button_pressed (GocItem *item, int button, double x, double y)
GnmPane *pane;
SheetObject *so;
+ if (scg_wbcg (GNM_SIMPLE_CANVAS (item->canvas)->scg)->new_object) {
+ ItemGrid *grid = GNM_PANE (item->canvas)->grid;
+ return GOC_ITEM_GET_CLASS (grid)->button_pressed (GOC_ITEM (grid), button, x, y);
+ }
+
if (button > 3)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]