From f165eb7b8ef35643338083e83de4b0b2f269f2d2 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 12 Feb 2025 16:58:24 -0800 Subject: [PATCH] recompute row infos on watch column drag --- src/raddbg/raddbg_views.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/raddbg/raddbg_views.c b/src/raddbg/raddbg_views.c index 3a8c5f6f..5740afaf 100644 --- a/src/raddbg/raddbg_views.c +++ b/src/raddbg/raddbg_views.c @@ -2529,6 +2529,7 @@ RD_VIEW_UI_FUNCTION_DEF(watch) //////////////////////// //- rjf: build boundaries // + B32 cell_pcts_are_dirty = 0; ProfScope("build boundaries") { U64 idx = 0; @@ -2651,8 +2652,7 @@ RD_VIEW_UI_FUNCTION_DEF(watch) } rd_cfg_equip_stringf(min_cfg, "%f", min_pct__post); rd_cfg_equip_stringf(max_cfg, "%f", max_pct__post); - cell->pct = min_pct__post; - cell->next->pct = max_pct__post; + cell_pcts_are_dirty = 1; } } } @@ -2676,6 +2676,19 @@ RD_VIEW_UI_FUNCTION_DEF(watch) } } + //////////////////////// + //- rjf: if cell widths are dirty -> recompute row infos + // + if(cell_pcts_are_dirty) + { + U64 idx = 0; + for(EV_WindowedRowNode *row_node = rows.first; row_node != 0; row_node = row_node->next, idx += 1) + { + EV_Row *row = &row_node->row; + row_infos[idx] = rd_watch_row_info_from_row(scratch.arena, row); + } + } + //////////////////////// //- rjf: build table //