Skip to content

Commit

Permalink
Fix evidence not being consistently presentable (#1048)
Browse files Browse the repository at this point in the history
* Fixup evidence presentation code, methink

* Bump RC, because I can
  • Loading branch information
Salanto authored Sep 8, 2024
1 parent 0c10f03 commit fedf260
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aoapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion src/aoevidencedisplay.cpp
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions src/aoevidencedisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AOEvidenceDisplay : public QLabel
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);
Expand Down
6 changes: 5 additions & 1 deletion src/courtroom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fedf260

Please sign in to comment.