From acf86c8d53c4660e2488353522508759872cf057 Mon Sep 17 00:00:00 2001 From: Edward Barber Date: Thu, 7 Jul 2022 23:21:24 -0700 Subject: [PATCH] Fix vjoy activation condition handling Previously all vjoy activation conditions would be reset to the default value when the UI was refreshed. This was due to several lines in `VJoyConditionWidget._modify_vjoy` which were intended to reset to a default value if the VJoy input was modified. Unfortunately, `_modify_vjoy` is called every time the UI is reset, thus resetting the condition trigger in addition to the intended effect of updating the selected VJoy input. To avoid the reset, we simply removed the lines that change the activation condition within `_modify_vjoy`. --- gremlin/ui/activation_condition.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gremlin/ui/activation_condition.py b/gremlin/ui/activation_condition.py index 8e5adfb9..82cada2a 100644 --- a/gremlin/ui/activation_condition.py +++ b/gremlin/ui/activation_condition.py @@ -624,14 +624,6 @@ def _modify_vjoy(self, data): self.condition_data.vjoy_id = data["device_id"] self.condition_data.input_type = data["input_type"] self.condition_data.input_id = data["input_id"] - - if data["input_type"] == InputType.JoystickAxis: - self.condition_data.comparison = "inside" - elif data["input_type"] == InputType.JoystickButton: - self.condition_data.comparison = "pressed" - elif data["input_type"] == InputType.JoystickHat: - self.condition_data.comparison = \ - util.hat_tuple_to_direction((0, 0)) self._create_ui() def _range_lower_changed_cb(self, value):