Private
Public Access
fix(regression): for adding files in the files & media panel.
This commit is contained in:
@@ -3521,6 +3521,7 @@ def render_files_and_media(app: App) -> None:
|
|||||||
imgui.dummy(imgui.ImVec2(0, 5))
|
imgui.dummy(imgui.ImVec2(0, 5))
|
||||||
if imgui.button("Add Files to Inventory"):
|
if imgui.button("Add Files to Inventory"):
|
||||||
r = hide_tk_root(); paths = filedialog.askopenfilenames(); r.destroy()
|
r = hide_tk_root(); paths = filedialog.askopenfilenames(); r.destroy()
|
||||||
|
from src import models
|
||||||
for p in paths:
|
for p in paths:
|
||||||
if p not in [f.path if hasattr(f, "path") else f for f in app.files]: app.files.append(models.FileItem(path=p))
|
if p not in [f.path if hasattr(f, "path") else f for f in app.files]: app.files.append(models.FileItem(path=p))
|
||||||
imgui.same_line()
|
imgui.same_line()
|
||||||
|
|||||||
Reference in New Issue
Block a user