aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/aolayer.h3
-rw-r--r--src/aolayer.cpp10
-rw-r--r--src/courtroom.cpp2
3 files changed, 15 insertions, 0 deletions
diff --git a/include/aolayer.h b/include/aolayer.h
index c32da024..1984b77e 100644
--- a/include/aolayer.h
+++ b/include/aolayer.h
@@ -64,6 +64,9 @@ public:
// Stop the movie, clearing the image
void stop();
+ // Stop the movie and clear all vectors
+ void kill();
+
// Set the m_flipped variable to true/false
void set_flipped(bool p_flipped) { m_flipped = p_flipped; }
diff --git a/src/aolayer.cpp b/src/aolayer.cpp
index 2fac58be..e7664950 100644
--- a/src/aolayer.cpp
+++ b/src/aolayer.cpp
@@ -493,6 +493,16 @@ void AOLayer::freeze()
preanim_timer->stop();
}
+void AOLayer::kill()
+{
+ // used for when we want to ensure a file is loaded anew
+ this->stop();
+ this->clear();
+ movie_frames.clear();
+ movie_delays.clear();
+ last_path = "";
+}
+
void CharLayer::movie_ticker()
{
AOLayer::movie_ticker();
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 16ec73e8..76431e5b 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1299,6 +1299,8 @@ void Courtroom::set_background(QString p_background, bool display)
ui_vp_objection->stop();
chat_tick_timer->stop();
ui_vp_evidence_display->reset();
+ ui_vp_background->kill();
+ ui_vp_desk->kill();
set_scene(
QString::number(ao_app->get_desk_mod(current_char, current_emote)),
current_side);