Address PR review changes #6660

This commit is contained in:
Andrej730
2025-05-12 11:19:06 +05:00
parent e2c1a54e0a
commit 4268e1376c
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ classes = [
operator.SelectURIAttribute,
operator.SetTab,
operator.SwitchTab,
operator.Show_system_info,
operator.ShowSystemInfo,
prop.StrProperty,
operator.BIM_OT_enum_property_search, # /!\ Register AFTER prop.StrProperty
prop.ObjProperty,
+6 -4
View File
@@ -1288,19 +1288,20 @@ class CopyTextToClipboard(bpy.types.Operator):
return {"FINISHED"}
class Show_system_info(bpy.types.Operator):
class ShowSystemInfo(bpy.types.Operator):
bl_idname = "bim.show_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()
def execute(self, context):
context.window_manager.clipboard = self.info_text
self.report({"INFO"}, "System information copied to clipboard.")
# invoke_popup doesn't show a popup, if there's no `execute` method.
return {"FINISHED"}
def invoke(self, context, event):
assert context.window_manager
# Invoke the bim.copy_debug_information operator to get the info to the clipboard
bpy.ops.bim.copy_debug_information()
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)
def draw(self, context):
assert self.layout
layout = self.layout
col = layout.column()