From cd526b7f5e14bb0f0939d8c250ce822406053b19 Mon Sep 17 00:00:00 2001 From: Mark Ruffner Date: Sat, 18 Feb 2017 12:27:36 -0600 Subject: [PATCH] Medical/Repair 3den Toolbox State Fix (Bug fix for #4902) (#4905) * Update medical/repair 3den away from missionNamespace * Simplify save --- addons/medical/CfgEden.hpp | 7 +++---- addons/repair/CfgEden.hpp | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/medical/CfgEden.hpp b/addons/medical/CfgEden.hpp index 9579f29c61..bebfdb9549 100644 --- a/addons/medical/CfgEden.hpp +++ b/addons/medical/CfgEden.hpp @@ -9,8 +9,8 @@ class Cfg3DEN { }; }; class GVAR(isMedicControl): Title { - attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);"; - attributeSave = "(missionnamespace getvariable ['ace_isMedic_temp',0]) - 1;"; + attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);"; + attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1"; class Controls: Controls { class Title: Title{}; class Value: ctrlToolbox { @@ -22,7 +22,6 @@ class Cfg3DEN { rows = 1; columns = 4; strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)}; - onToolboxSelChanged = "missionnamespace setvariable ['ace_isMedic_temp',_this select 1];"; }; }; }; @@ -36,7 +35,7 @@ class Cfg3DEN { control = QGVAR(isMedicControl); displayName = CSTRING(AssignMedicRoles_role_DisplayName); tooltip = CSTRING(Attributes_isMedic_Description); - expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};); + expression = QUOTE(if (_value > -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};); typeName = "NUMBER"; condition = "objectBrain"; defaultValue = "-1"; diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index eb7933fee4..c11f0b96b8 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -9,8 +9,8 @@ class Cfg3DEN { }; }; class GVAR(isEngineerControl): Title { - attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);"; - attributeSave = "(missionnamespace getvariable ['ace_isEng_temp',0]) - 1;"; + attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);"; + attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1"; class Controls: Controls { class Title: Title{}; class Value: ctrlToolbox { @@ -22,7 +22,6 @@ class Cfg3DEN { rows = 1; columns = 4; strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)}; - onToolboxSelChanged = "missionnamespace setvariable ['ace_isEng_temp',_this select 1];"; }; }; };