aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorin1tiate <32779090+in1tiate@users.noreply.github.com>2024-08-31 08:42:32 -0500
committerGitHub <noreply@github.com>2024-08-31 15:42:32 +0200
commit851b8c6a69386255b09ca3612bb83e565d922414 (patch)
tree0d035a44ea6ac3cdef07030e21bc1700fdecd2e5
parentcbda03ed6c1ef8a2ff006be716c9b61cf565bcc8 (diff)
[Bugfix] move effects box reset to reset_ui (#1045)
-rw-r--r--src/courtroom.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index b8e8625b..59ac09e6 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -2258,13 +2258,6 @@ void Courtroom::on_chat_return_pressed()
}
packet_contents.append(effect + "|" + p_effect_folder + "|" + fx_sound);
- if (!Options::getInstance().clearEffectsDropdownOnPlayEnabled() && !ao_app->get_effect_property(effect, current_char, p_effect_folder, "sticky").startsWith("true"))
- {
- ui_effects_dropdown->blockSignals(true);
- ui_effects_dropdown->setCurrentIndex(0);
- ui_effects_dropdown->blockSignals(false);
- effect = "";
- }
}
if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::CUSTOM_BLIPS))
@@ -2304,6 +2297,14 @@ void Courtroom::reset_ui()
ui_sfx_remove->hide();
custom_sfx = "";
}
+ // Why was this in the IC enter key handler before...? Whatever. Hopefully putting it here instead doesn't break anything.
+ if (!Options::getInstance().clearEffectsDropdownOnPlayEnabled() && !ao_app->get_effect_property(effect, current_char, ao_app->read_char_ini(current_char, "effects", "Options"), "sticky").startsWith("true"))
+ {
+ ui_effects_dropdown->blockSignals(true);
+ ui_effects_dropdown->setCurrentIndex(0);
+ ui_effects_dropdown->blockSignals(false);
+ effect = "";
+ }
// If sticky preanims is disabled
if (!Options::getInstance().clearPreOnPlayEnabled())
{