mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Selecting a git revision updates info box
This commit is contained in:
@@ -45,6 +45,18 @@ class IfcGitListItem(PropertyGroup):
|
||||
description="does this commit reference our ifc file",
|
||||
default=False,
|
||||
)
|
||||
author_name: StringProperty(
|
||||
name="Author Name",
|
||||
default="",
|
||||
)
|
||||
author_email: StringProperty(
|
||||
name="Author Email",
|
||||
default="",
|
||||
)
|
||||
message: StringProperty(
|
||||
name="Commit Message",
|
||||
default="",
|
||||
)
|
||||
|
||||
|
||||
class IfcGitProperties(PropertyGroup):
|
||||
|
||||
@@ -119,7 +119,6 @@ class IFCGIT_PT_panel(bpy.types.Panel):
|
||||
return
|
||||
|
||||
item = props.ifcgit_commits[props.commit_index]
|
||||
commit = IfcGitData.data["commit"]
|
||||
if not item.relevant:
|
||||
row = layout.row()
|
||||
row.label(text="Revision unrelated to current IFC project", icon="ERROR")
|
||||
@@ -127,11 +126,11 @@ class IFCGIT_PT_panel(bpy.types.Panel):
|
||||
box = layout.box()
|
||||
column = box.column(align=True)
|
||||
row = column.row()
|
||||
row.label(text=commit.hexsha)
|
||||
row.label(text=item.hexsha)
|
||||
row = column.row()
|
||||
row.label(text=commit.author.name + " <" + commit.author.email + ">")
|
||||
row.label(text=item.author_name + " <" + item.author_email + ">")
|
||||
row = column.row()
|
||||
row.label(text=commit.message)
|
||||
row.label(text=item.message)
|
||||
|
||||
|
||||
class COMMIT_UL_List(bpy.types.UIList):
|
||||
|
||||
@@ -108,9 +108,13 @@ class IfcGit:
|
||||
continue
|
||||
|
||||
props.ifcgit_commits.add()
|
||||
props.ifcgit_commits[-1].hexsha = commit.hexsha
|
||||
list_item = props.ifcgit_commits[-1]
|
||||
list_item.hexsha = commit.hexsha
|
||||
list_item.message = commit.message
|
||||
list_item.author_name = commit.author.name
|
||||
list_item.author_email = commit.author.email
|
||||
if commit in commits_relevant:
|
||||
props.ifcgit_commits[-1].relevant = True
|
||||
list_item.relevant = True
|
||||
|
||||
@classmethod
|
||||
def is_valid_ref_format(cls, string):
|
||||
|
||||
Reference in New Issue
Block a user