mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-12 05:49:19 +03:00
Fix one px missmatch between click and drag handling of node selection.
This commit is contained in:
parent
eaa04e3208
commit
7a25b6aaee
@ -1478,7 +1478,7 @@ void treeview_redraw(treeview *tree, int x, int y, struct rect *clip,
|
||||
|
||||
style = (count & 0x1) ? &plot_style_odd : &plot_style_even;
|
||||
if (tree->drag.type == TV_DRAG_SELECTION &&
|
||||
(render_y + height > sel_min &&
|
||||
(render_y + height >= sel_min &&
|
||||
render_y < sel_max)) {
|
||||
invert_selection = true;
|
||||
} else {
|
||||
@ -1719,7 +1719,7 @@ static nserror treeview_node_selection_walk_cb(treeview_node *n,
|
||||
break;
|
||||
|
||||
case TREEVIEW_WALK_COMMIT_SELECT_DRAG:
|
||||
if (sw->current_y > sw->data.drag.sel_min &&
|
||||
if (sw->current_y >= sw->data.drag.sel_min &&
|
||||
sw->current_y - height <
|
||||
sw->data.drag.sel_max) {
|
||||
n->flags ^= TREE_NODE_SELECTED;
|
||||
|
Loading…
Reference in New Issue
Block a user