diff --git a/studio/studio_file_selectLayer.py b/studio/studio_file_selectLayer.py index bfdcbca..49b8019 100644 --- a/studio/studio_file_selectLayer.py +++ b/studio/studio_file_selectLayer.py @@ -22,6 +22,7 @@ from project_manager import pm_project #UI modules from UI import UI_elements from UI import UI_color +from UI import UI_math # Studio from studio import checklist @@ -82,9 +83,12 @@ def layer(win, call): if "AllFiles" not in win.current: win.current["AllFiles"] = [] - for r, d, f in sorted(os.walk(win.project)): + for r, d, f in os.walk(win.project): for item in f: win.current["AllFiles"].append(os.path.join(r, item).replace(win.project, "")) + + UI_math.sort_nicely(win.current["AllFiles"]) + # Now that we have the files. There should be some way to filter them. @@ -223,11 +227,16 @@ def layer(win, call): win.scroll["file_select"] = 0 if "AllFiles" in win.current: - for filename in win.current["AllFiles"]: + for filename in reversed(win.current["AllFiles"]): ######################## FILTERING STARTS ########################## okay = True + + # Remove all _backup files + if "_backup" in filename: + okay = False + # By search