From 5f2ad35d41c3b662c9f9920ee0c9e249ffe7b65b Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Fri, 5 Jun 2020 01:09:57 -0400 Subject: [PATCH] fixing issue #287 --- src/video2x_gui.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/video2x_gui.py b/src/video2x_gui.py index 180900b..ada8fb3 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -842,12 +842,9 @@ class Video2XMainWindow(QMainWindow): self.input_table_view.setModel(self.input_table_model) def input_table_delete_selected(self): - items_to_delete = [] - for index in [i.row() for i in self.input_table_view.selectedIndexes()]: - items_to_delete.append(self.input_table_data[index]) - - for item in items_to_delete: - self.input_table_data.remove(item) + indexes_to_delete = [i.row() for i in self.input_table_view.selectedIndexes()] + for index in sorted(indexes_to_delete, reverse=True): + del self.input_table_data[index] self.update_output_path() self.update_input_table()