mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 16:43:00 +00:00
Fix #3480 : Scene tabs now show their individual description on hover
Also correct minor typo
This commit is contained in:
@@ -42,11 +42,14 @@ from math import radians
|
|||||||
|
|
||||||
class SetTab(bpy.types.Operator):
|
class SetTab(bpy.types.Operator):
|
||||||
bl_idname = "bim.set_tab"
|
bl_idname = "bim.set_tab"
|
||||||
bl_label = "Set Tab"
|
bl_label = "Set Current Tab"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "Sets the current property tab"
|
|
||||||
tab: bpy.props.StringProperty()
|
tab: bpy.props.StringProperty()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def description(cls, context, properties):
|
||||||
|
return next((t[1] for t in blenderbim.bim.prop.get_tab(None, context) if t[0] == properties.tab), "")
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
if context.area.spaces.active.search_filter:
|
if context.area.spaces.active.search_filter:
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ def get_length_value(self):
|
|||||||
return self.float_value * si_conversion
|
return self.float_value * si_conversion
|
||||||
|
|
||||||
|
|
||||||
def set_lenght_value(self, value):
|
def set_length_value(self, value):
|
||||||
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
|
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
|
||||||
self.float_value = value / si_conversion
|
self.float_value = value / si_conversion
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ class Attribute(PropertyGroup):
|
|||||||
set=set_float_value,
|
set=set_float_value,
|
||||||
)
|
)
|
||||||
length_value: FloatProperty(
|
length_value: FloatProperty(
|
||||||
name="Value", description=tooltip, get=get_length_value, set=set_lenght_value, unit="LENGTH"
|
name="Value", description=tooltip, get=get_length_value, set=set_length_value, unit="LENGTH"
|
||||||
)
|
)
|
||||||
enum_items: StringProperty(name="Value")
|
enum_items: StringProperty(name="Value")
|
||||||
enum_descriptions: CollectionProperty(type=StrProperty)
|
enum_descriptions: CollectionProperty(type=StrProperty)
|
||||||
|
|||||||
Reference in New Issue
Block a user