Commit c83f6371 authored by Morten Welinder's avatar Morten Welinder

GUI: Fix critical when dragging pane divider too far.

parent 344aa55c
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.
......
......@@ -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);
}
......
......@@ -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);
......
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