Skip to content

Commit fedf260

Browse files
authored
Fix evidence not being consistently presentable (#1048)
* Fixup evidence presentation code, methink * Bump RC, because I can
1 parent 0c10f03 commit fedf260

4 files changed

+12
-3
lines changed

src/aoapplication.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void AOApplication::destruct_courtroom()
119119

120120
QString AOApplication::get_version_string()
121121
{
122-
return QString::number(RELEASE) + "." + QString::number(MAJOR_VERSION) + "." + QString::number(MINOR_VERSION) + " RC4";
122+
return QString::number(RELEASE) + "." + QString::number(MAJOR_VERSION) + "." + QString::number(MINOR_VERSION) + " RC5";
123123
}
124124

125125
QString AOApplication::find_image(QStringList p_list)

src/aoevidencedisplay.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "aoevidencedisplay.h"
22

33
#include "datatypes.h"
4-
#include "file_functions.h"
54

65
AOEvidenceDisplay::AOEvidenceDisplay(AOApplication *p_ao_app, QWidget *p_parent)
76
: QLabel(p_parent)
@@ -91,3 +90,8 @@ void AOEvidenceDisplay::combo_resize(int w, int h)
9190
this->resize(f_size);
9291
m_evidence_movie->resize(w, h);
9392
}
93+
94+
void AOEvidenceDisplay::setLastEvidenceIndex(int f_index)
95+
{
96+
m_last_evidence_index = f_index;
97+
}

src/aoevidencedisplay.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class AOEvidenceDisplay : public QLabel
1818
void show_evidence(int p_index, QString p_evidence_image, bool is_left_side, int p_volume);
1919
void reset();
2020
void combo_resize(int w, int h);
21+
void setLastEvidenceIndex(int f_index);
2122

2223
Q_SIGNALS:
2324
void show_evidence_details(int index);

src/courtroom.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -3393,9 +3393,13 @@ void Courtroom::display_evidence_image()
33933393
QString f_image = local_evidence_list.at(f_evi_id - 1).image;
33943394
// QString f_evi_name = local_evidence_list.at(f_evi_id - 1).name;
33953395
// def jud and hlp should display the evidence icon on the RIGHT side
3396-
bool is_left_side = !(side.startsWith("def") || side == "hlp");
3396+
bool is_left_side = !(side.startsWith("def") || side == "hlp"); // FIXME : Hardcoded
33973397
ui_vp_evidence_display->show_evidence(f_evi_id, f_image, is_left_side, sfx_player->volume());
33983398
}
3399+
else
3400+
{
3401+
ui_vp_evidence_display->setLastEvidenceIndex(-1);
3402+
}
33993403
}
34003404

34013405
void Courtroom::handle_ic_speaking()

0 commit comments

Comments
 (0)