mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
Address PR review changes #6660
This commit is contained in:
@@ -123,7 +123,7 @@ classes = [
|
|||||||
operator.SelectURIAttribute,
|
operator.SelectURIAttribute,
|
||||||
operator.SetTab,
|
operator.SetTab,
|
||||||
operator.SwitchTab,
|
operator.SwitchTab,
|
||||||
operator.Show_system_info,
|
operator.ShowSystemInfo,
|
||||||
prop.StrProperty,
|
prop.StrProperty,
|
||||||
operator.BIM_OT_enum_property_search, # /!\ Register AFTER prop.StrProperty
|
operator.BIM_OT_enum_property_search, # /!\ Register AFTER prop.StrProperty
|
||||||
prop.ObjProperty,
|
prop.ObjProperty,
|
||||||
|
|||||||
@@ -1288,19 +1288,20 @@ class CopyTextToClipboard(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class Show_system_info(bpy.types.Operator):
|
class ShowSystemInfo(bpy.types.Operator):
|
||||||
bl_idname = "bim.show_system_info"
|
bl_idname = "bim.show_system_info"
|
||||||
bl_label = "System Info"
|
bl_label = "System Info"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_description = "Show debug information and copy it to the clipboard."
|
||||||
|
bl_options = set()
|
||||||
|
|
||||||
info_text: bpy.props.StringProperty()
|
info_text: bpy.props.StringProperty()
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
context.window_manager.clipboard = self.info_text
|
# invoke_popup doesn't show a popup, if there's no `execute` method.
|
||||||
self.report({"INFO"}, "System information copied to clipboard.")
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
|
assert context.window_manager
|
||||||
# Invoke the bim.copy_debug_information operator to get the info to the clipboard
|
# Invoke the bim.copy_debug_information operator to get the info to the clipboard
|
||||||
bpy.ops.bim.copy_debug_information()
|
bpy.ops.bim.copy_debug_information()
|
||||||
self.info_text = context.window_manager.clipboard
|
self.info_text = context.window_manager.clipboard
|
||||||
@@ -1308,6 +1309,7 @@ class Show_system_info(bpy.types.Operator):
|
|||||||
return context.window_manager.invoke_popup(self, width=600)
|
return context.window_manager.invoke_popup(self, width=600)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
|
assert self.layout
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user