From feb25af8b86012f4e02f678092b2e94a892f8428 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 84a1658c..d426b3c3 100644 --- a/piker/ui/_editors.py +++ b/piker/ui/_editors.py @@ -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,