diff --git a/data/pref.xml b/data/pref.xml
index c9a711197..b4b82c31d 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -180,7 +180,7 @@
-
+
@@ -212,7 +212,7 @@
-
+
diff --git a/src/app/ui/editor/play_state.cpp b/src/app/ui/editor/play_state.cpp
index 9922f1e17..d8495aa1d 100644
--- a/src/app/ui/editor/play_state.cpp
+++ b/src/app/ui/editor/play_state.cpp
@@ -1,5 +1,5 @@
// Aseprite
-// Copyright (C) 2020-2022 Igara Studio S.A.
+// Copyright (C) 2020-2023 Igara Studio S.A.
// Copyright (C) 2001-2018 David Capello
//
// This program is distributed under the terms of
@@ -66,12 +66,24 @@ void PlayState::onEnterState(Editor* editor)
}
// Get the tag
- if (!m_playAll)
+ if (!m_playAll) {
m_tag = m_editor
->getCustomizationDelegate()
->getTagProvider()
->getTagByFrame(m_refFrame, true);
+ // Don't repeat the tag infinitely if the tag repeat field doesn't
+ // say so.
+ if (m_playSubtags &&
+ m_tag &&
+ m_tag->repeat() != 0) {
+ m_tag = nullptr;
+ }
+ }
+ else {
+ m_tag = nullptr;
+ }
+
// Go to the first frame of the animation or active frame tag
if (m_playOnce) {
frame_t frame = 0;