Skip to content

Commit 9831768

Browse files
authored
Context Menu - Use setCuratorSelected (#746)
1 parent e0197f5 commit 9831768

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

addons/context_menu/functions/fnc_initDisplayCurator.sqf

+5-9
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,13 @@ if (GVAR(enabled) == 1) exitWith {
8282
// Clear selected entities if waypoint placement can occur and restore next frame
8383
// Using entities tree as an alternative to the lack of a command to set curator selected entities
8484
if (_canPlaceWaypoints) then {
85-
private _ctrlEntities = findDisplay IDD_RSCDISPLAYCURATOR displayCtrl IDC_RSCDISPLAYCURATOR_ENTITIES;
86-
private _selection = tvSelection _ctrlEntities;
87-
_ctrlEntities tvSetCurSel [-1];
88-
8985
[{
90-
params ["_ctrlEntities", "_selection"];
86+
params ["_objects", "_groups", "_waypoints", "_markers"];
87+
88+
setCuratorSelected (_objects + _groups + _waypoints + _markers);
89+
}, curatorSelected] call CBA_fnc_execNextFrame;
9190

92-
{
93-
_ctrlEntities tvSetSelected [_x, true];
94-
} forEach _selection;
95-
}, [_ctrlEntities, _selection]] call CBA_fnc_execNextFrame;
91+
setCuratorSelected [];
9692
};
9793
};
9894
};

addons/main/script_mod.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
1111

1212
// MINIMAL required version for the Mod. Components can specify others..
13-
#define REQUIRED_VERSION 2.12
13+
#define REQUIRED_VERSION 2.14
1414
#define REQUIRED_CBA_VERSION {3,15,8}
1515

1616
#ifdef COMPONENT_BEAUTIFIED

0 commit comments

Comments
 (0)