bim.clear_measurement - add poll message

This commit is contained in:
Andrej730
2026-03-16 15:27:10 +05:00
parent 025fb769e2
commit ba36dc82ff
@@ -3184,7 +3184,10 @@ class ClearMeasurement(bpy.types.Operator):
@classmethod
def poll(cls, context):
polyline_props = tool.Model.get_polyline_props()
return len(polyline_props.measurement_polyline) > 0
if len(polyline_props.measurement_polyline) > 0:
return True
cls.poll_message_set("No measurement to clear.")
return False
def execute(self, context):
polyline_props = tool.Model.get_polyline_props()