[gnumeric] GUI: Fix critical when dragging pane divider too far.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Fix critical when dragging pane divider too far.
- Date: Wed, 28 May 2014 13:47:56 +0000 (UTC)
commit c83f63717f8b2ee93a433fca780a9403d381e05b
Author: Morten Welinder <terra gnome org>
Date: Wed May 28 09:47:24 2014 -0400
GUI: Fix critical when dragging pane divider too far.
ChangeLog | 5 +++++
src/sheet-control-gui.c | 2 ++
src/sheet-view.c | 8 ++++++++
3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ec4b1fc..f6307fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2014-05-28 Morten Welinder <terra gnome org>
+ * src/sheet-control-gui.c (resize_pane_pos): Improve the situation
+ when we drag the handle into the col/row canvas.
+
+ * src/sheet-view.c (sv_freeze_panes): Add debug code.
+
* src/sheet-control-gui.c (scg_finalize): Get rid of the drag
handler. Fixes #730884.
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index 0411e48..e9cf8f9 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -1272,6 +1272,7 @@ resize_pane_pos (SheetControlGUI *scg, GtkPaned *p,
else
pos -= pa.width;
}
+ pos = MAX (pos, 0);
pos += pane->first_offset.x;
colrow = gnm_pane_find_col (pane, pos, guide_pos);
} else {
@@ -1289,6 +1290,7 @@ resize_pane_pos (SheetControlGUI *scg, GtkPaned *p,
else
pos -= pa.height;
}
+ pos = MAX (pos, 0);
pos += pane->first_offset.y;
colrow = gnm_pane_find_row (pane, pos, guide_pos);
}
diff --git a/src/sheet-view.c b/src/sheet-view.c
index c9e3508..18dc780 100644
--- a/src/sheet-view.c
+++ b/src/sheet-view.c
@@ -45,6 +45,7 @@
#include "gnumeric-conf.h"
#include "sheet-style.h"
#include "mstyle.h"
+#include "gutils.h"
#include <gsf/gsf-impl-utils.h>
@@ -786,6 +787,13 @@ sv_freeze_panes (SheetView *sv,
{
g_return_if_fail (IS_SHEET_VIEW (sv));
+ if (gnm_debug_flag ("frozen-panes")) {
+ g_printerr ("Frozen: %-10s",
+ frozen ? cellpos_as_string (frozen) : "-");
+ g_printerr ("Unfrozen: %s\n",
+ unfrozen ? cellpos_as_string (unfrozen) : "-");
+ }
+
if (frozen != NULL) {
g_return_if_fail (unfrozen != NULL);
g_return_if_fail (unfrozen->col >= frozen->col);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]