From 3ca253598afceaf80bbd58ca0b6277869e9a9c00 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Tue, 18 Jul 2023 05:35:06 +0200 Subject: [PATCH] Fix a typo, find a bug. --- birdvisu/annotations/analysis.py | 2 +- poor_mans_visualisation.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/birdvisu/annotations/analysis.py b/birdvisu/annotations/analysis.py index 3062bd1..121b375 100644 --- a/birdvisu/annotations/analysis.py +++ b/birdvisu/annotations/analysis.py @@ -96,7 +96,7 @@ class ShortestPathTree(Annotator): self.e = edge def __lt__(self, other): return (self.mt, self.dist) < (other.mt, other.dist) - def __ew__(self, other): + def __eq__(self, other): return (self.mt, self.dist) == (other.mt, other.dist) heap = [CE(e.cost, e) for e in topo.vertices[self.start_vtxid].outgoing_edges] heap.sort() diff --git a/poor_mans_visualisation.py b/poor_mans_visualisation.py index e2615af..7c36a9e 100755 --- a/poor_mans_visualisation.py +++ b/poor_mans_visualisation.py @@ -268,6 +268,7 @@ class MainWindow(QtWidgets.QMainWindow): ann = self.annot_topo.annotations[self.highlighter] for shk in ann.for_vertex.keys() | ann.for_edge.keys(): shapes[shk].setPen(QtGui.QPen(QtGui.QColor('blue'))) + # FIXME: also color edges in opposite direction for sh in shapes.values(): self.scene.addItem(sh) main_window = MainWindow()