From 86b0b2aaca99b165903148178b2daaee6e5e925a Mon Sep 17 00:00:00 2001 From: PaulJonasJost Date: Mon, 14 Apr 2025 17:59:05 +0200 Subject: [PATCH] changed a bug in column deletion that did not accurately move invalid cells --- src/petab_gui/models/pandas_table_model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/petab_gui/models/pandas_table_model.py b/src/petab_gui/models/pandas_table_model.py index 1a3afd9..c690783 100644 --- a/src/petab_gui/models/pandas_table_model.py +++ b/src/petab_gui/models/pandas_table_model.py @@ -317,7 +317,10 @@ def update_invalid_cells(self, selected, mode: str = "rows"): continue smaller_count = sum(1 for x in sorted_to_del if x < to_be_change) new_val = to_be_change - smaller_count - new_invalid_cells.add((new_val, not_changed)) + if mode == "rows": + new_invalid_cells.add((new_val, not_changed)) + if mode == "columns": + new_invalid_cells.add((not_changed, new_val)) self._invalid_cells = new_invalid_cells def notify_data_color_change(self, row, column):