Merge pull request #632 from AttorneyOnline/fix/background-loop
Don't restart background if background is unchanged
This commit is contained in:
commit
6b064ddb42
@ -153,6 +153,12 @@ void BackgroundLayer::load_image(QString p_filename)
|
|||||||
qDebug() << "[BackgroundLayer] BG loaded: " << p_filename;
|
qDebug() << "[BackgroundLayer] BG loaded: " << p_filename;
|
||||||
#endif
|
#endif
|
||||||
QString final_path = ao_app->get_image_suffix(ao_app->get_background_path(p_filename));
|
QString final_path = ao_app->get_image_suffix(ao_app->get_background_path(p_filename));
|
||||||
|
|
||||||
|
if (final_path == last_path) {
|
||||||
|
// Don't restart background if background is unchanged
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
start_playback(final_path);
|
start_playback(final_path);
|
||||||
play();
|
play();
|
||||||
}
|
}
|
||||||
|
@ -1377,8 +1377,6 @@ void Courtroom::set_background(QString p_background, bool display)
|
|||||||
ui_vp_objection->stop();
|
ui_vp_objection->stop();
|
||||||
chat_tick_timer->stop();
|
chat_tick_timer->stop();
|
||||||
ui_vp_evidence_display->reset();
|
ui_vp_evidence_display->reset();
|
||||||
ui_vp_background->kill();
|
|
||||||
ui_vp_desk->kill();
|
|
||||||
QString f_side = current_side;
|
QString f_side = current_side;
|
||||||
if (current_side == "")
|
if (current_side == "")
|
||||||
f_side = ao_app->get_char_side(current_char);
|
f_side = ao_app->get_char_side(current_char);
|
||||||
|
Loading…
Reference in New Issue
Block a user