aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalanto <62221668+Salanto@users.noreply.github.com>2021-12-24 21:36:41 +0100
committerGitHub <noreply@github.com>2021-12-24 14:36:41 -0600
commitc57afe821e637fe08467848190a83553d913aaa6 (patch)
treee357e8a7c23a39cc08572ac6dd4f639e3376f7b0
parent5ce0e6416e9e821be69219cc8a949c00e2cb462c (diff)
Sanity check before removing the ui element (#612)
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
-rw-r--r--src/courtroom.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index a9f2da64..f9095267 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -4436,10 +4436,11 @@ void Courtroom::set_sfx_dropdown()
void Courtroom::on_sfx_dropdown_changed(int p_index)
{
- Q_UNUSED(p_index);
ui_ic_chat_message->setFocus();
- ui_sfx_remove->hide();
- custom_sfx = "";
+ if (p_index == 0) {
+ ui_sfx_remove->hide();
+ custom_sfx = "";
+ }
}
void Courtroom::on_sfx_dropdown_custom(QString p_sfx)