Factor some line and label steps
parent
8501a9be4f
commit
5a0612e6a8
|
@ -253,6 +253,9 @@ class LineEditor:
|
||||||
dotted=dotted,
|
dotted=dotted,
|
||||||
size=size,
|
size=size,
|
||||||
)
|
)
|
||||||
|
line.label._use_extra_fields = size is not None
|
||||||
|
|
||||||
|
# cache staging line after creation
|
||||||
self._stage_line = line
|
self._stage_line = line
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -271,18 +274,14 @@ class LineEditor:
|
||||||
line._dotted = dotted
|
line._dotted = dotted
|
||||||
line.color = color
|
line.color = color
|
||||||
line.setMouseHover(hl_on_hover)
|
line.setMouseHover(hl_on_hover)
|
||||||
|
line.show()
|
||||||
|
|
||||||
# XXX: must have this to trigger updated
|
# XXX: must have this to trigger updated
|
||||||
# label contents rendering
|
# label contents rendering
|
||||||
line.setPos(y)
|
line.setPos(y)
|
||||||
line.set_level()
|
line.set_level()
|
||||||
|
|
||||||
line.update()
|
|
||||||
line.show()
|
|
||||||
label.show()
|
label.show()
|
||||||
|
|
||||||
# label.set_label_str(line.)
|
|
||||||
|
|
||||||
self._active_staged_line = line
|
self._active_staged_line = line
|
||||||
|
|
||||||
# hide crosshair y-line
|
# hide crosshair y-line
|
||||||
|
|
Loading…
Reference in New Issue