Fix more bugs

Now it does something.
older_libs
LEdoian 2 years ago
parent a759cdfd93
commit 561c39e052

@ -12,7 +12,7 @@ from PySide6 import QtCore, QtGui, QtWidgets
# Classification
class DifferenceStatus:
class DifferenceStatus(Enum):
"""Describes differences between two topologies"""
NORMAL = auto()
MISSING = auto()
@ -109,6 +109,7 @@ def assign_brushes(at):
for tags in annot.values():
statuses = list(filter(lambda x: isinstance(x, DifferenceStatus), tags))
status = statuses[-1] if len(statuses) > 0 else DifferenceStatus.DISCREPANCY # should always have something.
print(repr(status))
color = {
DifferenceStatus.NORMAL: 'black',
DifferenceStatus.EXTRA: 'green',
@ -182,4 +183,5 @@ def create_qgritems(at):
line = QtWidgets.QGraphicsLineItem(rpos.x, rpos.y, npos.x, npos.y)
at.link_annotations[lk].append(line)
return at

@ -29,6 +29,14 @@ final_topo = combiner.get_complete_topology()
from birdvisu.visualisation import annotators
def dbg_ann(at):
print('hello')
return at
# annotators.create_qgritems does not like being run without Qt initialization.
from PySide6 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication([])
annotated_topology = maps_new.annotate_topology(final_topo,
# A semi-canonical set of annotators:
[
@ -40,11 +48,9 @@ annotated_topology = maps_new.annotate_topology(final_topo,
]
)
# Render the widget
from PySide6 import QtCore, QtGui, QtWidgets
# Render the widget
app = QtWidgets.QApplication([])
scene = QtWidgets.QGraphicsScene()
for tagsrc in [

Loading…
Cancel
Save