From 2fa4ed969ca4cdf7628a22f9940104ed19349a08 Mon Sep 17 00:00:00 2001 From: goodboy Date: Sun, 1 Feb 2026 20:38:02 -0500 Subject: [PATCH] .ui._editors: log multiline styling and re-leveling --- piker/ui/_editors.py | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/piker/ui/_editors.py b/piker/ui/_editors.py index 872ec910..5d2ee9d5 100644 --- a/piker/ui/_editors.py +++ b/piker/ui/_editors.py @@ -168,7 +168,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' @@ -286,7 +286,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 @@ -329,7 +331,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 @@ -337,7 +343,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 @@ -569,11 +579,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() @@ -640,8 +650,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,