From 0d6b89fa1f2e96d70860b268a9fd303c32dcf2e7 Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Thu, 23 Jan 2025 03:17:11 -0600 Subject: [PATCH] Use global evidence instead of local for display (#1073) --- src/courtroom.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 372432a..30f4bad 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2611,11 +2611,11 @@ void Courtroom::log_chatmessage(QString f_message, int f_char_id, QString f_show } // If the evidence ID is in the valid range - if (f_evi_id > 0 && f_evi_id <= local_evidence_list.size()) + if (f_evi_id > 0 && f_evi_id <= global_evidence_list.size()) { blankpost = false; // Obtain the evidence name - QString f_evi_name = local_evidence_list.at(f_evi_id - 1).name; + QString f_evi_name = global_evidence_list.at(f_evi_id - 1).name; switch (f_log_mode) { case IO_ONLY: @@ -3415,11 +3415,10 @@ void Courtroom::display_evidence_image() { QString side = m_chatmessage[SIDE]; int f_evi_id = m_chatmessage[EVIDENCE_ID].toInt(); - if (f_evi_id > 0 && f_evi_id <= local_evidence_list.size()) + if (f_evi_id > 0 && f_evi_id <= global_evidence_list.size()) { // shifted by 1 because 0 is no evidence per legacy standards - 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; + QString f_image = global_evidence_list.at(f_evi_id - 1).image; // def jud and hlp should display the evidence icon on the RIGHT side 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());