[studio] Make Delete key initiate deletion of selected directory

This commit is contained in:
Gary Talent 2025-05-07 20:15:38 -05:00
parent bb99c99f01
commit aa095f7680

View File

@ -93,6 +93,9 @@ void FileTreeModel::draw(turbine::Context &tctx) const noexcept {
if (ImGui::IsItemActivated() || ImGui::IsItemClicked(1)) { if (ImGui::IsItemActivated() || ImGui::IsItemClicked(1)) {
m_explorer.setSelectedNode(this); m_explorer.setSelectedNode(this);
} }
if (ImGui::IsItemFocused() && ImGui::IsKeyPressed(ImGuiKey_Delete)) {
m_explorer.fileDeleted(m_fullPath);
}
ig::IDStackItem const idStackItem{m_name}; ig::IDStackItem const idStackItem{m_name};
m_explorer.drawDirContextMenu(m_fullPath); m_explorer.drawDirContextMenu(m_fullPath);
if (m_explorer.fileDraggable()) { if (m_explorer.fileDraggable()) {