aboutsummaryrefslogtreecommitdiff
path: root/src/aoscene.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-10-12 01:43:48 +0300
committerCrystalwarrior <varsash@gmail.com>2019-10-12 01:43:48 +0300
commit330aa9755095cd4f12f028452d268c50311d3710 (patch)
treeb5fb6bf39032266db2151cd118c0cee71459558c /src/aoscene.cpp
parent990f653e4a063a684b5d5584c7454c36a1036a85 (diff)
Properly handle "true song name" even with folders/categories and file formats (paving way for folder-categorized music lists set up by servers)
Prevent BG's from falling back on default BG path (this isn't really user-convenient and causes more trouble than its worth, e.g. stands appearing on BG's that dont' want stands to appear) Implement Case Cafe's method of categorization for (a) and (b) emotes
Diffstat (limited to 'src/aoscene.cpp')
-rw-r--r--src/aoscene.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/aoscene.cpp b/src/aoscene.cpp
index c9314258..527d25db 100644
--- a/src/aoscene.cpp
+++ b/src/aoscene.cpp
@@ -13,8 +13,15 @@ AOScene::AOScene(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent)
void AOScene::set_image(QString p_image)
{
QString background_path = ao_app->get_image_suffix(ao_app->get_background_path(p_image));
- if (!file_exists(background_path))
- background_path = ao_app->get_image_suffix(ao_app->get_default_background_path(p_image)); //Default path
+ if (!file_exists(background_path)) //If image is missing, clear current image
+ {
+ //background_path = ao_app->get_image_suffix(ao_app->get_default_background_path(p_image)); //Default path
+ this->clear();
+ this->setMovie(nullptr);
+
+ m_movie->stop();
+ return;
+ }
if (file_exists(background_path) && background_path == last_image)
return;
@@ -46,8 +53,15 @@ void AOScene::set_legacy_desk(QString p_image)
{
QString desk_path = ao_app->get_image_suffix(ao_app->get_background_path(p_image));
- if (!file_exists(desk_path))
- desk_path = ao_app->get_image_suffix(ao_app->get_default_background_path(p_image)); //Default path
+ if (!file_exists(desk_path)) //If image is missing, clear current image
+ {
+ //desk_path = ao_app->get_image_suffix(ao_app->get_default_background_path(p_image)); //Default path
+ this->clear();
+ this->setMovie(nullptr);
+
+ m_movie->stop();
+ return;
+ }
if (file_exists(desk_path) && desk_path == last_image)
return;