mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 12:53:43 +00:00
bim.clear_measurement - add poll message
This commit is contained in:
@@ -3184,7 +3184,10 @@ class ClearMeasurement(bpy.types.Operator):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
polyline_props = tool.Model.get_polyline_props()
|
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):
|
def execute(self, context):
|
||||||
polyline_props = tool.Model.get_polyline_props()
|
polyline_props = tool.Model.get_polyline_props()
|
||||||
|
|||||||
Reference in New Issue
Block a user