From e8eee9d04998383128e2d62877c766881b402f17 Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Sat, 5 Nov 2016 15:36:16 +0200 Subject: [PATCH] Delete button fix get next selected --- youtube_dl_gui/mainframe.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube_dl_gui/mainframe.py b/youtube_dl_gui/mainframe.py index f3db285..bf61bbb 100644 --- a/youtube_dl_gui/mainframe.py +++ b/youtube_dl_gui/mainframe.py @@ -488,7 +488,7 @@ class MainFrame(wx.Frame): self.opt_manager.options["save_path"] = self._path_combobox.GetValue() def _on_delete(self, event): - index = self._status_list.GetFirstSelected() + index = self._status_list.get_next_selected() if index == -1: #self._create_popup("No row selected", self.ERROR_LABEL, wx.OK | wx.ICON_EXCLAMATION) @@ -529,8 +529,9 @@ class MainFrame(wx.Frame): self._status_list.remove_row(index) self._download_list.remove(object_id) + index -= 1 - index = self._status_list.GetNextSelected(index - 1) + index = self._status_list.get_next_selected(index) def _on_play(self, event): selected_rows = self._status_list.get_all_selected()