From d4ecd23d0ac663a30464450fde51ae8bb95a694d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Wed, 11 Jul 2018 16:13:26 +0200 Subject: [PATCH] Correct sorting of VMs in Qube Manager Fixed two situations in which there was no sub-sorting alphabetically. fixes QubesOS/qubes-issues#1022 --- qubesmanager/table_widgets.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qubesmanager/table_widgets.py b/qubesmanager/table_widgets.py index 8fca4f8..76ad2f8 100644 --- a/qubesmanager/table_widgets.py +++ b/qubesmanager/table_widgets.py @@ -353,6 +353,8 @@ class VmInternalItem(QtGui.QTableWidgetItem): return True elif other.vm.qid == 0: return False + elif self.internal == other.internal: + return self.vm.name < other.vm.name return super(VmInternalItem, self).__lt__(other) except exc.QubesPropertyAccessError: return False @@ -516,6 +518,8 @@ class VmIPItem(QtGui.QTableWidgetItem): return True elif other.vm.qid == 0: return False + elif self.ip == other.ip: + return self.vm.name < other.vm.name return super(VmIPItem, self).__lt__(other) except exc.QubesPropertyAccessError: return False