From 232ca9c58c0ce89000676508ce304e202a8ce030 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sat, 29 Mar 2025 19:16:40 +0100 Subject: [PATCH] followup of previous commit: do draw_selection in the right place in select_rect() --- src/actions.c | 10 +++------- src/select.c | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/actions.c b/src/actions.c index 833d600a..f6608b07 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3824,13 +3824,6 @@ void select_rect(int stretch, int what, int select) drawtemprect(xctx->gctiled,NOW, nl_xx1,nl_yy1,nl_xx2,nl_yy2); xctx->nl_xr2=xctx->mousex;xctx->nl_yr2=xctx->mousey; - /* redundant: done in select_inside() and select_touch() */ - #if 0 - /* 20171026 update unselected objects while dragging */ - rebuild_selected_array(); - draw_selection(xctx->gc[SELLAYER], 0); - #endif - if(!xctx->nl_sel || (incremental_select && xctx->nl_dir == 0)) select_inside(stretch, nl_xx1, nl_yy1, nl_xx2, nl_yy2, xctx->nl_sel); else if(incremental_select && xctx->nl_dir == 1 && sel_touch) @@ -3838,6 +3831,9 @@ void select_rect(int stretch, int what, int select) nl_xx1=xctx->nl_xr;nl_xx2=xctx->nl_xr2;nl_yy1=xctx->nl_yr;nl_yy2=xctx->nl_yr2; RECTORDER(nl_xx1,nl_yy1,nl_xx2,nl_yy2); drawtemprect(xctx->gc[SELLAYER],NOW, nl_xx1,nl_yy1,nl_xx2,nl_yy2); + + rebuild_selected_array(); + draw_selection(xctx->gc[SELLAYER], 0); } else if(what & START) { diff --git a/src/select.c b/src/select.c index f815d0d5..8aa84813 100644 --- a/src/select.c +++ b/src/select.c @@ -1587,10 +1587,12 @@ void select_inside(int stretch, double x1,double y1, double x2, double y2, int s drawtemprect(xctx->gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0); drawtempline(xctx->gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0); + #if 0 if(!sel) { rebuild_selected_array(); draw_selection(xctx->gc[SELLAYER], 0); } + #endif } @@ -1722,10 +1724,12 @@ void select_touch(double x1,double y1, double x2, double y2, int sel) /*added un drawtemprect(xctx->gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0); drawtempline(xctx->gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0); + #if 0 if(!sel) { rebuild_selected_array(); draw_selection(xctx->gc[SELLAYER], 0); } + #endif }