Skip to content

Commit 486ef3e

Browse files
committed
Add label item creation for segment shapes in ResultShapePlotPyAdapter
1 parent 2edc496 commit 486ef3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datalab/adapters_plotpy/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ def create_label_item(self, obj: BaseObj) -> LabelItem | None:
263263
Returns:
264264
Label item
265265
"""
266-
if self.result.add_label:
266+
if self.result.shapetype is ShapeTypes.SEGMENT:
267+
# Add a label item for the segment shape
267268
return super().create_label_item(obj)
268269
return None
269270

0 commit comments

Comments
 (0)