From 9ffe09ea54873c1a3488f39871c9db071c1a1929 Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Tue, 19 Jul 2022 13:31:12 -0400 Subject: [PATCH] [PluginService] Backport fix for "Activate a Simulator Event From List" from 'next' branch. --- MSFSTouchPortalPlugin/Services/PluginService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MSFSTouchPortalPlugin/Services/PluginService.cs b/MSFSTouchPortalPlugin/Services/PluginService.cs index 2d3f9ac..d178cb6 100644 --- a/MSFSTouchPortalPlugin/Services/PluginService.cs +++ b/MSFSTouchPortalPlugin/Services/PluginService.cs @@ -932,6 +932,10 @@ private void ProcessSimEventFromActionData(PluginActions actId, ActionData data) // No WASM module... try to use a named MobiFlight event... I guess. Then fall through and treat it as any other custom named action event. eventName = "MobiFlight." + p.Label; } + // Check for known/imported type, which may have special formatting applied to the name + else if (actId == PluginActions.SetKnownSimEvent && _pluginConfig.TryGetImportedSimEventIdFromSelector(eventName, out var cleanEventName)) { + eventName = cleanEventName; + } Enum eventId; // dynamically added event actions have no mappings, the ActionEventType.Id is the SimEventClientId