[Bugfix] move effects box reset to reset_ui (#1045)

This commit is contained in:
in1tiate 2024-08-31 08:42:32 -05:00 committed by GitHub
parent cbda03ed6c
commit 851b8c6a69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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())
{