From aa095f76800f7ba27ac38bf1ee87893094dd8e22 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 7 May 2025 20:15:38 -0500 Subject: [PATCH] [studio] Make Delete key initiate deletion of selected directory --- src/olympic/studio/modlib/src/filetreemodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/olympic/studio/modlib/src/filetreemodel.cpp b/src/olympic/studio/modlib/src/filetreemodel.cpp index b921f8dd..a32e1196 100644 --- a/src/olympic/studio/modlib/src/filetreemodel.cpp +++ b/src/olympic/studio/modlib/src/filetreemodel.cpp @@ -93,6 +93,9 @@ void FileTreeModel::draw(turbine::Context &tctx) const noexcept { if (ImGui::IsItemActivated() || ImGui::IsItemClicked(1)) { m_explorer.setSelectedNode(this); } + if (ImGui::IsItemFocused() && ImGui::IsKeyPressed(ImGuiKey_Delete)) { + m_explorer.fileDeleted(m_fullPath); + } ig::IDStackItem const idStackItem{m_name}; m_explorer.drawDirContextMenu(m_fullPath); if (m_explorer.fileDraggable()) {