diff options
| author | Salanto <62221668+Salanto@users.noreply.github.com> | 2021-12-24 21:36:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-24 14:36:41 -0600 |
| commit | c57afe821e637fe08467848190a83553d913aaa6 (patch) | |
| tree | e357e8a7c23a39cc08572ac6dd4f639e3376f7b0 | |
| parent | 5ce0e6416e9e821be69219cc8a949c00e2cb462c (diff) | |
Sanity check before removing the ui element (#612)
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
| -rw-r--r-- | src/courtroom.cpp | 7 |
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) |
