From 3cd83ab86b37285dcdab4ba1f155fb79ed1e1aa9 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 28 Sep 2023 12:51:18 +0200 Subject: Fix animations of the chart themes example Amends 66f7f1fc866dd19aa5a86164d93a7b9a50e07af6. Pick-to: 6.5.3 Task-number: PYSIDE-2425 Change-Id: I5cd225de9ae7fbd666d13892cdd8a78b21c9054e Reviewed-by: Adrian Herrmann Reviewed-by: Shyamnath Premnadh (cherry picked from commit fc34925c835a8b04d68e5d65bd653283c9a02043) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit d4907702801b3356393e8e3e2eefe48551795342) --- examples/charts/chartthemes/main.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/examples/charts/chartthemes/main.py b/examples/charts/chartthemes/main.py index 192382a98..28c819c16 100644 --- a/examples/charts/chartthemes/main.py +++ b/examples/charts/chartthemes/main.py @@ -302,20 +302,10 @@ class ThemeWidget(QWidget): options = self.ui.animatedComboBox.itemData(idx) if len(self.charts): - chart = self.charts[0].chart() - animation_options = chart.animationOptions() + animation_options = self.charts[0].chart().animationOptions() if animation_options != options: for chart_view in self.charts: - options_name = QChart.NoAnimation - if options == 0: - options_name = QChart.NoAnimation - elif options == 1: - options_name = QChart.GridAxisAnimations - elif options == 2: - options_name = QChart.SeriesAnimations - elif options == 3: - options_name = QChart.AllAnimations - chart_view.chart().setAnimationOptions(options_name) + chart_view.chart().setAnimationOptions(options) # Update legend alignment idx = self.ui.legendComboBox.currentIndex() -- cgit v1.2.3