diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2022-01-08 14:52:08 -0600 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2022-01-08 14:52:08 -0600 |
| commit | 7389b5071b72ee9dec9f1cad20fb4563b25c6a2c (patch) | |
| tree | 91997094514ad4717c3b93da502e95455a670a3d /src/aolayer.cpp | |
| parent | b519dbaae30644373d2906b6bdc95ac56f2c5768 (diff) | |
Don't restart background if background is unchanged
Diffstat (limited to 'src/aolayer.cpp')
| -rw-r--r-- | src/aolayer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/aolayer.cpp b/src/aolayer.cpp index a5e1d9bd..ba7f2cb4 100644 --- a/src/aolayer.cpp +++ b/src/aolayer.cpp @@ -153,6 +153,12 @@ void BackgroundLayer::load_image(QString p_filename) qDebug() << "[BackgroundLayer] BG loaded: " << p_filename; #endif 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); play(); } |
