tdf#158664 Ignore Notifications when SlideShow is inactive

The impl SlideshowImpl gets notifications for changes from
the ObjectModel, but needs to ignore them when SlideShow
is not active/running. For discussion how to do this see
comments in task.

Change-Id: Ic251af4b82f0f4b48d8d9b0127dd2f6015966935
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161922
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
This commit is contained in:
Armin Le Grand (allotropia)
2024-01-11 18:12:48 +01:00
committed by Armin Le Grand
parent 1bef59c318
commit 2184890a0e
+8
View File
@@ -3192,6 +3192,14 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
// better do nothing when no DrawModel (should not happen)
return;
// tdf#158664 I am surprised, but the 'this' instance keeps incarnated
// when the slideshow was running once, so need to check for
// SlideShow instance/running to be safe.
// NOTE: isRunning() checks mxShow.is(), that is what we want
if (!isRunning())
// no SlideShow instance or not running, nothing to do
return;
const SdrHintKind eHintKind(static_cast<const SdrHint&>(rHint).GetKind());
if (SdrHintKind::ObjectChange == eHintKind)