Skip to content

Commit

Permalink
[Bugfix] move effects box reset to reset_ui (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
in1tiate authored Aug 31, 2024
1 parent cbda03e commit 851b8c6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/courtroom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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())
{
Expand Down

0 comments on commit 851b8c6

Please sign in to comment.