From 560e28f19e2963cbd61a0ffdb1dcb54eecb937cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Mon, 9 Apr 2018 17:18:41 +0200 Subject: [PATCH] Reset scroll level for each new projection. --- CHANGELOG | 1 + openslides/core/views.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7c613efe2..09d392434 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -124,6 +124,7 @@ Core: - Added --debug-email flag to print all emails to stdout [#3530]. - Added --no-template-caching flag to disable template caching for easier development [#3566]. +- Reset scroll level for each new projection [#3686]. Mediafiles: - New form for uploading multiple files [#3650]. diff --git a/openslides/core/views.py b/openslides/core/views.py index 2df11bae4..f23974e80 100644 --- a/openslides/core/views.py +++ b/openslides/core/views.py @@ -272,6 +272,10 @@ class ProjectorViewSet(ModelViewSet): raise ValidationError({'detail': 'Data must be a list.'}) projector_instance = self.get_object() + # reset scroll level + if (projector_instance.scroll != 0): + projector_instance.scroll = 0 + projector_instance.save() projector_config = {} for key, value in projector_instance.config.items(): if value.get('stable'):