From 9831768a5a0bf6eb02c4f0cc2b80183c8b7c15b8 Mon Sep 17 00:00:00 2001 From: mharis001 <34453221+mharis001@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:38:54 -0400 Subject: [PATCH] Context Menu - Use setCuratorSelected (#746) --- .../functions/fnc_initDisplayCurator.sqf | 14 +++++--------- addons/main/script_mod.hpp | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/addons/context_menu/functions/fnc_initDisplayCurator.sqf b/addons/context_menu/functions/fnc_initDisplayCurator.sqf index 33509ed18..b54bfab8b 100644 --- a/addons/context_menu/functions/fnc_initDisplayCurator.sqf +++ b/addons/context_menu/functions/fnc_initDisplayCurator.sqf @@ -82,17 +82,13 @@ if (GVAR(enabled) == 1) exitWith { // Clear selected entities if waypoint placement can occur and restore next frame // Using entities tree as an alternative to the lack of a command to set curator selected entities if (_canPlaceWaypoints) then { - private _ctrlEntities = findDisplay IDD_RSCDISPLAYCURATOR displayCtrl IDC_RSCDISPLAYCURATOR_ENTITIES; - private _selection = tvSelection _ctrlEntities; - _ctrlEntities tvSetCurSel [-1]; - [{ - params ["_ctrlEntities", "_selection"]; + params ["_objects", "_groups", "_waypoints", "_markers"]; + + setCuratorSelected (_objects + _groups + _waypoints + _markers); + }, curatorSelected] call CBA_fnc_execNextFrame; - { - _ctrlEntities tvSetSelected [_x, true]; - } forEach _selection; - }, [_ctrlEntities, _selection]] call CBA_fnc_execNextFrame; + setCuratorSelected []; }; }; }; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index a8234f1d7..fce004b1a 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,7 +10,7 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 2.12 +#define REQUIRED_VERSION 2.14 #define REQUIRED_CBA_VERSION {3,15,8} #ifdef COMPONENT_BEAUTIFIED