From b5954f15c5d2a86f51a212af3fab6876fe83ccea Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 29 Jan 2025 18:47:48 -0600 Subject: [PATCH] [studio] Restore context menu for root dir, but exclude Delete --- src/olympic/studio/applib/src/projectexplorer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/olympic/studio/applib/src/projectexplorer.cpp b/src/olympic/studio/applib/src/projectexplorer.cpp index 8a092f805..20ba0dfac 100644 --- a/src/olympic/studio/applib/src/projectexplorer.cpp +++ b/src/olympic/studio/applib/src/projectexplorer.cpp @@ -47,14 +47,14 @@ void ProjectExplorer::fileContextMenu(ox::StringViewCR path) const noexcept { } void ProjectExplorer::dirContextMenu(ox::StringViewCR path) const noexcept { - if (path.len() && ImGui::BeginPopupContextItem("DirMenu", ImGuiPopupFlags_MouseButtonRight)) { + if (ImGui::BeginPopupContextItem("DirMenu", ImGuiPopupFlags_MouseButtonRight)) { if (ImGui::MenuItem("Add Item")) { addItem.emit(path); } if (ImGui::MenuItem("Add Directory")) { addDir.emit(path); } - if (ImGui::MenuItem("Delete")) { + if (path.len() && ImGui::MenuItem("Delete")) { deleteItem.emit(path); } ImGui::EndPopup();