diff options
| author | Leifa <26681464+TrickyLeifa@users.noreply.github.com> | 2024-07-19 13:20:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-19 13:20:21 +0200 |
| commit | 4129c1ffda6ea333c66b6f950da05a9c161a7738 (patch) | |
| tree | b39fcf2d2b83867f9b232e3cdbad44b731e41ffc | |
| parent | 640b026534db21b854df83367f2815b857aaa76a (diff) | |
Fix slide position overriding when it shouldn't (#1023)
* Fix slide position overriding when it shouldn't
* Cover all positions instead
| -rw-r--r-- | src/path_functions.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/path_functions.cpp b/src/path_functions.cpp index 669f2282..8de2904b 100644 --- a/src/path_functions.cpp +++ b/src/path_functions.cpp @@ -82,18 +82,14 @@ BackgroundPosition AOApplication::get_pos_path(const QString &pos) { // witness is default if pos is invalid QString f_pos = pos; + // legacy overrides for new format if found - if (pos == "def" && file_exists(get_image_suffix(get_background_path("court")))) - { - f_pos = "court:def"; - } - else if (pos == "pro" && file_exists(get_image_suffix(get_background_path("court")))) + if (file_exists(get_image_suffix(get_background_path("court")))) { - f_pos = "court:pro"; - } - else if (pos == "wit" && file_exists(get_image_suffix(get_background_path("court")))) - { - f_pos = "court:wit"; + if (!read_design_ini("court:" + f_pos + "/origin", get_background_path("design.ini")).isEmpty()) + { + f_pos = QString("court:%1").arg(f_pos); + } } QStringList f_pos_split = f_pos.split(":"); |
