1
0
Fork 0

Fix active state after text entry in a ParamSlider

This commit is contained in:
Robbert van der Helm 2022-03-22 02:07:19 +01:00
parent a2b39d9281
commit 4e09491dd5

View file

@ -307,7 +307,8 @@ impl View for ParamSlider {
if let Some(param_slider_event) = event.message.downcast() { if let Some(param_slider_event) = event.message.downcast() {
match param_slider_event { match param_slider_event {
ParamSliderEvent::CancelTextInput => { ParamSliderEvent::CancelTextInput => {
cx.emit(ParamSliderInternalEvent::SetTextInputActive(false)) cx.emit(ParamSliderInternalEvent::SetTextInputActive(false));
cx.current.set_active(cx, false);
} }
ParamSliderEvent::TextInput(string) => { ParamSliderEvent::TextInput(string) => {
if let Some(normalized_value) = if let Some(normalized_value) =
@ -318,7 +319,7 @@ impl View for ParamSlider {
cx.emit(RawParamEvent::EndSetParameter(self.param_ptr)); cx.emit(RawParamEvent::EndSetParameter(self.param_ptr));
} }
cx.emit(ParamSliderInternalEvent::SetTextInputActive(false)) cx.emit(ParamSliderInternalEvent::SetTextInputActive(false));
} }
} }
} }