Skip to content

Commit

Permalink
Context Menu - Use setCuratorSelected (zen-mod#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
mharis001 authored Oct 3, 2023
1 parent e0197f5 commit 9831768
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions addons/context_menu/functions/fnc_initDisplayCurator.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9831768

Please sign in to comment.