mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fixed a crash when trying to change sort order from an invisible column
This commit is contained in:
parent
c554bf9edd
commit
246a8409bf
1 changed files with 2 additions and 0 deletions
|
@ -1239,6 +1239,7 @@ class AllTorrents(BaseMode, component.Component):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
i = max(0, i)
|
i = max(0, i)
|
||||||
|
i = min(len(self.__cols_to_show) - 1, i)
|
||||||
|
|
||||||
self.config["sort_primary"] = self.__cols_to_show[i]
|
self.config["sort_primary"] = self.__cols_to_show[i]
|
||||||
self.config.save()
|
self.config.save()
|
||||||
|
@ -1254,6 +1255,7 @@ class AllTorrents(BaseMode, component.Component):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
i = min(len(self.__cols_to_show) - 1, i)
|
i = min(len(self.__cols_to_show) - 1, i)
|
||||||
|
i = max(0, i)
|
||||||
|
|
||||||
self.config["sort_primary"] = self.__cols_to_show[i]
|
self.config["sort_primary"] = self.__cols_to_show[i]
|
||||||
self.config.save()
|
self.config.save()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue