mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Merge branch 'v0.7.0' of https://github.com/IfcOpenShell/IfcOpenShell into v0.7.0
This commit is contained in:
@@ -211,6 +211,33 @@ class COMMIT_UL_List(bpy.types.UIList):
|
|||||||
layout.label(text=refs + commit.message.split("\n")[0], icon="DECORATE_ANIMATE")
|
layout.label(text=refs + commit.message.split("\n")[0], icon="DECORATE_ANIMATE")
|
||||||
layout.label(text=time.strftime("%c", time.localtime(commit.committed_date)))
|
layout.label(text=time.strftime("%c", time.localtime(commit.committed_date)))
|
||||||
|
|
||||||
|
def draw_filter(self, context, layout):
|
||||||
|
|
||||||
|
# We only need filtering and reverse sort, not reordering by name
|
||||||
|
row = layout.row(align=True)
|
||||||
|
row.prop(self, "filter_name", text="")
|
||||||
|
row.prop(self, "use_filter_invert", text="", icon="ARROW_LEFTRIGHT")
|
||||||
|
row.prop(self, "use_filter_sort_reverse", text="", icon="SORT_DESC")
|
||||||
|
|
||||||
|
def filter_items(self, context, data, propname):
|
||||||
|
|
||||||
|
commits = getattr(data, propname)
|
||||||
|
helper_funcs = bpy.types.UI_UL_list
|
||||||
|
|
||||||
|
# Default return values.
|
||||||
|
flt_flags = []
|
||||||
|
flt_neworder = list(range(len(commits)))
|
||||||
|
|
||||||
|
# Filtering by commit message
|
||||||
|
if self.filter_name:
|
||||||
|
flt_flags = helper_funcs.filter_items_by_name(
|
||||||
|
self.filter_name, self.bitflag_filter_item, commits, "message", reverse=False
|
||||||
|
)
|
||||||
|
if not flt_flags:
|
||||||
|
flt_flags = [self.bitflag_filter_item] * len(commits)
|
||||||
|
|
||||||
|
return flt_flags, flt_neworder
|
||||||
|
|
||||||
|
|
||||||
class IFCGIT_PT_revision_inspector(bpy.types.Panel):
|
class IFCGIT_PT_revision_inspector(bpy.types.Panel):
|
||||||
"""Tool panel to interact with revision history"""
|
"""Tool panel to interact with revision history"""
|
||||||
|
|||||||
Reference in New Issue
Block a user