diff options
| author | in1tiate <radwoodward@vikings.grayson.edu> | 2021-02-14 19:22:05 -0600 |
|---|---|---|
| committer | in1tiate <radwoodward@vikings.grayson.edu> | 2021-02-14 19:22:05 -0600 |
| commit | 68851a16aa417d2b942bf36b207242f800149fe7 (patch) | |
| tree | 938b1e1019f5d44b1c8ab76f5143bebd9ccbd771 /src | |
| parent | 97cb8cf1929302ebe4cad460cce31a0b0ecc3119 (diff) | |
fix objection prematurely adjusting chatbox
Diffstat (limited to 'src')
| -rw-r--r-- | src/courtroom.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 76431e5b..4353e5cb 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2199,17 +2199,7 @@ bool Courtroom::handle_objection() objection_mod = m_chatmessage[OBJECTION_MOD].toInt(); } - if (is_ao2_bg) { - set_size_and_pos(ui_vp_chatbox, "ao2_chatbox", m_chatmessage[CHAR_NAME]); - } - else { - set_size_and_pos(ui_vp_chatbox, "chatbox", m_chatmessage[CHAR_NAME]); - } - set_size_and_pos(ui_vp_showname, "showname", m_chatmessage[CHAR_NAME]); - set_size_and_pos(ui_vp_message, "message", m_chatmessage[CHAR_NAME]); - ui_vp_message->move(ui_vp_message->x() + ui_vp_chatbox->x(), - ui_vp_message->y() + ui_vp_chatbox->y()); - ui_vp_message->setTextInteractionFlags(Qt::NoTextInteraction); + // if an objection is used if (objection_mod <= 4 && objection_mod >= 1) { @@ -2557,6 +2547,18 @@ void Courtroom::initialize_chatbox() ui_vp_showname->setText(m_chatmessage[SHOWNAME]); } + if (is_ao2_bg) { + set_size_and_pos(ui_vp_chatbox, "ao2_chatbox", m_chatmessage[CHAR_NAME]); + } + else { + set_size_and_pos(ui_vp_chatbox, "chatbox", m_chatmessage[CHAR_NAME]); + } + set_size_and_pos(ui_vp_showname, "showname", m_chatmessage[CHAR_NAME]); + set_size_and_pos(ui_vp_message, "message", m_chatmessage[CHAR_NAME]); + ui_vp_message->move(ui_vp_message->x() + ui_vp_chatbox->x(), + ui_vp_message->y() + ui_vp_chatbox->y()); + ui_vp_message->setTextInteractionFlags(Qt::NoTextInteraction); + QString customchar; if (ao_app->is_customchat_enabled()) customchar = m_chatmessage[CHAR_NAME]; |
