From fedf26075a1cd5ad56e66bb5213e98277795d144 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:18:12 +0200 Subject: [PATCH] Fix evidence not being consistently presentable (#1048) * Fixup evidence presentation code, methink * Bump RC, because I can --- src/aoapplication.cpp | 2 +- src/aoevidencedisplay.cpp | 6 +++++- src/aoevidencedisplay.h | 1 + src/courtroom.cpp | 6 +++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/aoapplication.cpp b/src/aoapplication.cpp index 696d35d..0fe6cba 100644 --- a/src/aoapplication.cpp +++ b/src/aoapplication.cpp @@ -119,7 +119,7 @@ void AOApplication::destruct_courtroom() QString AOApplication::get_version_string() { - return QString::number(RELEASE) + "." + QString::number(MAJOR_VERSION) + "." + QString::number(MINOR_VERSION) + " RC4"; + return QString::number(RELEASE) + "." + QString::number(MAJOR_VERSION) + "." + QString::number(MINOR_VERSION) + " RC5"; } QString AOApplication::find_image(QStringList p_list) diff --git a/src/aoevidencedisplay.cpp b/src/aoevidencedisplay.cpp index 3f9c45d..9e33d5b 100644 --- a/src/aoevidencedisplay.cpp +++ b/src/aoevidencedisplay.cpp @@ -1,7 +1,6 @@ #include "aoevidencedisplay.h" #include "datatypes.h" -#include "file_functions.h" AOEvidenceDisplay::AOEvidenceDisplay(AOApplication *p_ao_app, QWidget *p_parent) : QLabel(p_parent) @@ -91,3 +90,8 @@ void AOEvidenceDisplay::combo_resize(int w, int h) this->resize(f_size); m_evidence_movie->resize(w, h); } + +void AOEvidenceDisplay::setLastEvidenceIndex(int f_index) +{ + m_last_evidence_index = f_index; +} diff --git a/src/aoevidencedisplay.h b/src/aoevidencedisplay.h index a259073..307f7ad 100644 --- a/src/aoevidencedisplay.h +++ b/src/aoevidencedisplay.h @@ -18,6 +18,7 @@ public: void show_evidence(int p_index, QString p_evidence_image, bool is_left_side, int p_volume); void reset(); void combo_resize(int w, int h); + void setLastEvidenceIndex(int f_index); Q_SIGNALS: void show_evidence_details(int index); diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 59ac09e..349e5a5 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -3393,9 +3393,13 @@ void Courtroom::display_evidence_image() QString f_image = local_evidence_list.at(f_evi_id - 1).image; // QString f_evi_name = local_evidence_list.at(f_evi_id - 1).name; // def jud and hlp should display the evidence icon on the RIGHT side - bool is_left_side = !(side.startsWith("def") || side == "hlp"); + bool is_left_side = !(side.startsWith("def") || side == "hlp"); // FIXME : Hardcoded ui_vp_evidence_display->show_evidence(f_evi_id, f_image, is_left_side, sfx_player->volume()); } + else + { + ui_vp_evidence_display->setLastEvidenceIndex(-1); + } } void Courtroom::handle_ic_speaking()