diff options
| author | in1tiate <radwoodward@vikings.grayson.edu> | 2021-02-14 19:21:49 -0600 |
|---|---|---|
| committer | in1tiate <radwoodward@vikings.grayson.edu> | 2021-02-14 19:21:49 -0600 |
| commit | 97cb8cf1929302ebe4cad460cce31a0b0ecc3119 (patch) | |
| tree | 75f483a7b7722a1d95b47c055077fc28f8a8f372 | |
| parent | 5fd3ed0fea0b62410e69ded2d96886e3635e8b17 (diff) | |
fix bg not resizing on reload theme
| -rw-r--r-- | include/aolayer.h | 3 | ||||
| -rw-r--r-- | src/aolayer.cpp | 10 | ||||
| -rw-r--r-- | src/courtroom.cpp | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/aolayer.h b/include/aolayer.h index c32da02..1984b77 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 2fac58b..e766495 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 16ec73e..76431e5 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); |
