From a0f54f354011114001891286d7fad30e7e828f41 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sat, 30 Jan 2021 13:40:10 -0600 Subject: [PATCH] Dont' scroll the slider if the futureSliderView is hidden. --- Clocker/Panel/PanelController.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Clocker/Panel/PanelController.swift b/Clocker/Panel/PanelController.swift index 618114c..2798e00 100644 --- a/Clocker/Panel/PanelController.swift +++ b/Clocker/Panel/PanelController.swift @@ -363,8 +363,13 @@ class PanelController: ParentPanelController { Logger.log(object: nil, for: "Scroll Event Ended") } - futureSlider.doubleValue += Double(event.scrollingDeltaX) - sliderMoved(futureSlider!) + // We only want to move the slider if the slider is visible. + // If the parent view is hidden, then that doesn't automatically mean that all the childViews are also hidden + // Hence, check if the parent view is totally hidden or not.. + if futureSliderView.isHidden == false { + futureSlider.doubleValue += Double(event.scrollingDeltaX) + sliderMoved(futureSlider!) + } } }