[studio] Suppress context menu for root dir in ProjectExplorer
All checks were successful
Build / build (push) Successful in 3m32s
All checks were successful
Build / build (push) Successful in 3m32s
This commit is contained in:
parent
0570f76236
commit
5dce9dd377
@ -47,17 +47,17 @@ void ProjectExplorer::fileContextMenu(ox::StringViewCR path) const noexcept {
|
||||
}
|
||||
|
||||
void ProjectExplorer::dirContextMenu(ox::StringViewCR path) const noexcept {
|
||||
if (ImGui::BeginPopupContextItem("DirMenu", ImGuiPopupFlags_MouseButtonRight)) {
|
||||
if (ImGui::MenuItem("Add Item")) {
|
||||
addItem.emit(path);
|
||||
}
|
||||
if (ImGui::MenuItem("Add Directory")) {
|
||||
addDir.emit(path);
|
||||
}
|
||||
if (path.len() && 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")) {
|
||||
deleteItem.emit(path);
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user