From 99142b037c5ee795d26693efcf64596972054315 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 14 Aug 2017 07:25:30 +1100 Subject: [PATCH] Fixup 0fecb69385 (custom labels were overwritten) --- src/hotkey/command_executor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp index a6223be663f8..773de8021554 100644 --- a/src/hotkey/command_executor.cpp +++ b/src/hotkey/command_executor.cpp @@ -478,11 +478,11 @@ void command_executor::get_menu_images(display& disp, std::vector& items item["label"] = desc; item["details"] = hotkey::get_names(item_id); - } else { - // If no matching hotkey was found, treat the id as a plaintext description. - // This is because either type of value can be written to the id field by - // the WMI manager. The plaintext description is used in the case the menu item - // specifies the relevant entry is *not* a hotkey. + } else if(item["label"].empty()) { + // If no matching hotkey was found and a custom label wasn't already set, treat + // the id as a plaintext description. This is because either type of value can + // be written to the id field by the WMI manager. The plaintext description is + // used in the case the menu item specifies the relevant entry is *not* a hotkey. item["label"] = item_id; } }