.ui._editors: log multiline styling and re-leveling

gap_annotator
Gud Boi 2026-02-01 20:38:02 -05:00
parent 2bf3aaddac
commit feb25af8b8
1 changed files with 23 additions and 10 deletions

View File

@ -163,7 +163,7 @@ class ArrowEditor(Struct):
'''
uid: str = arrow._uid
arrows: list[pg.ArrowItem] = self._arrows[uid]
log.info(
log.debug(
f'Removing arrow from views\n'
f'uid: {uid!r}\n'
f'{arrow!r}\n'
@ -281,7 +281,9 @@ class LineEditor(Struct):
for line in lines:
line.show_labels()
line.hide_markers()
log.debug(f'Level active for level: {line.value()}')
log.debug(
f'Line active @ level: {line.value()!r}'
)
# TODO: other flashy things to indicate the order is active
return lines
@ -324,7 +326,11 @@ class LineEditor(Struct):
if line in hovered:
hovered.remove(line)
log.debug(f'deleting {line} with oid: {uuid}')
log.debug(
f'Deleting level-line\n'
f'line: {line!r}\n'
f'oid: {uuid!r}\n'
)
line.delete()
# make sure the xhair doesn't get left off
@ -332,7 +338,11 @@ class LineEditor(Struct):
cursor.show_xhair()
else:
log.warning(f'Could not find line for {line}')
log.warning(
f'Could not find line for removal ??\n'
f'\n'
f'{line!r}\n'
)
return lines
@ -564,11 +574,11 @@ class SelectRect(QtWidgets.QGraphicsRectItem):
if update_label:
self.init_label(view_rect)
print(
'SelectRect modify:\n'
log.debug(
f'SelectRect modify,\n'
f'QRectF: {view_rect}\n'
f'start_pos: {start_pos}\n'
f'end_pos: {end_pos}\n'
f'start_pos: {start_pos!r}\n'
f'end_pos: {end_pos!r}\n'
)
self.show()
@ -635,8 +645,11 @@ class SelectRect(QtWidgets.QGraphicsRectItem):
dmn=dmn,
))
# print(f'x2, y2: {(x2, y2)}')
# print(f'xmn, ymn: {(xmn, ymx)}')
# tracing
# log.info(
# f'x2, y2: {(x2, y2)}\n'
# f'xmn, ymn: {(xmn, ymx)}\n'
# )
label_anchor = Point(
xmx + 2,