Fix evidence not being consistently presentable (#1048)

* Fixup evidence presentation code, methink

* Bump RC, because I can
This commit is contained in:
Salanto 2024-09-08 09:18:12 +02:00 committed by GitHub
parent 0c10f03150
commit fedf26075a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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);

View File

@ -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()