From 3c4dfbda9a65042a3420a1fc1debac731cec7a0f Mon Sep 17 00:00:00 2001 From: William JCM Date: Fri, 25 Nov 2022 09:43:32 +0100 Subject: [PATCH] SaveTool: make the weapon part selector focus on the current item. --- src/SaveTool/SaveTool_MassViewer_Weapons.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SaveTool/SaveTool_MassViewer_Weapons.cpp b/src/SaveTool/SaveTool_MassViewer_Weapons.cpp index 3c8250b..0a9de55 100644 --- a/src/SaveTool/SaveTool_MassViewer_Weapons.cpp +++ b/src/SaveTool/SaveTool_MassViewer_Weapons.cpp @@ -479,6 +479,9 @@ void SaveTool::drawWeaponEditor(Weapon& weapon) { if(ImGui::Selectable(mapped_part.second.data(), mapped_part.first == part.id)) { part.id = mapped_part.first; } + if(mapped_part.first == part.id) { + ImGui::SetItemDefaultFocus(); + } } ImGui::EndListBox();