diff options
Diffstat (limited to 'src/ui/ui_contacts.cpp')
| -rw-r--r-- | src/ui/ui_contacts.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/ui_contacts.cpp b/src/ui/ui_contacts.cpp index 24f45f7..e00fb78 100644 --- a/src/ui/ui_contacts.cpp +++ b/src/ui/ui_contacts.cpp @@ -196,12 +196,13 @@ static void draw_contact_list() } ImGui::SameLine(); - - // TODO check to make sure no invoices are connected to this contact. - snprintf(btn_name, sizeof(btn_name), "%s##%d", localize("form.delete"), i); - if (ImGui::Button(btn_name)) { - selected_for_removal = c; - ImGui::OpenPopup("ConfirmDeletePopup"); + if (administration_can_contact_be_deleted(c)) + { + snprintf(btn_name, sizeof(btn_name), "%s##%d", localize("form.delete"), i); + if (ImGui::Button(btn_name)) { + selected_for_removal = c; + ImGui::OpenPopup("ConfirmDeletePopup"); + } } } |
