Merge pull request #139 from AttorneyOnline/posdrp
Fix an oversight with the pos dropdown, add a small feature
This commit is contained in:
commit
21a8b6f6e6
@ -991,6 +991,12 @@ void Courtroom::enter_courtroom(int p_cid)
|
||||
|
||||
QString side = ao_app->get_char_side(current_char);
|
||||
|
||||
// We block signals from ui_pos_dropdown to stop on_pos_dropdown_changed from firing here.
|
||||
// Per the Qt docs, QSignalBlocker only affects the rest of this function,
|
||||
// so it doesn't stop the dropdown from working once we finish here.
|
||||
const QSignalBlocker blocker(ui_pos_dropdown);
|
||||
ui_pos_dropdown->setCurrentText(side);
|
||||
|
||||
if (side == "jud")
|
||||
{
|
||||
ui_witness_testimony->show();
|
||||
@ -3436,7 +3442,7 @@ void Courtroom::on_pos_dropdown_changed(int p_index)
|
||||
{
|
||||
ui_ic_chat_message->setFocus();
|
||||
|
||||
if (p_index < 0 || p_index > 5)
|
||||
if (p_index < 0 || p_index > 7)
|
||||
return;
|
||||
|
||||
toggle_judge_buttons(false);
|
||||
@ -3464,6 +3470,12 @@ void Courtroom::on_pos_dropdown_changed(int p_index)
|
||||
case 5:
|
||||
f_pos = "hlp";
|
||||
break;
|
||||
case 6:
|
||||
f_pos = "jur";
|
||||
break;
|
||||
case 7:
|
||||
f_pos = "sea";
|
||||
break;
|
||||
default:
|
||||
f_pos = "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user