mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
Fix Create Torrent Dialog Box - Some buttons raise Type Error if no row selected
This commit is contained in:
parent
553f35eae5
commit
e198ea14e4
@ -379,6 +379,8 @@ class CreateTorrentDialog:
|
||||
def _on_button_up_clicked(self, widget):
|
||||
log.debug("_on_button_up_clicked")
|
||||
row = self.glade.get_widget("tracker_treeview").get_selection().get_selected()[1]
|
||||
if row is None:
|
||||
return
|
||||
if self.trackers_liststore[row][0] == 0:
|
||||
return
|
||||
else:
|
||||
@ -387,6 +389,8 @@ class CreateTorrentDialog:
|
||||
def _on_button_down_clicked(self, widget):
|
||||
log.debug("_on_button_down_clicked")
|
||||
row = self.glade.get_widget("tracker_treeview").get_selection().get_selected()[1]
|
||||
if row is None:
|
||||
return
|
||||
self.trackers_liststore[row][0] += 1
|
||||
|
||||
def _on_button_add_clicked(self, widget):
|
||||
@ -430,4 +434,6 @@ class CreateTorrentDialog:
|
||||
def _on_button_remove_clicked(self, widget):
|
||||
log.debug("_on_button_remove_clicked")
|
||||
row = self.glade.get_widget("tracker_treeview").get_selection().get_selected()[1]
|
||||
if row is None:
|
||||
return
|
||||
self.trackers_liststore.remove(row)
|
||||
|
Loading…
x
Reference in New Issue
Block a user