Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 851b8c6

Browse files
authored
[Bugfix] move effects box reset to reset_ui (AttorneyOnline#1045)
1 parent cbda03e commit 851b8c6

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/courtroom.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,13 +2258,6 @@ void Courtroom::on_chat_return_pressed()
22582258
}
22592259

22602260
packet_contents.append(effect + "|" + p_effect_folder + "|" + fx_sound);
2261-
if (!Options::getInstance().clearEffectsDropdownOnPlayEnabled() && !ao_app->get_effect_property(effect, current_char, p_effect_folder, "sticky").startsWith("true"))
2262-
{
2263-
ui_effects_dropdown->blockSignals(true);
2264-
ui_effects_dropdown->setCurrentIndex(0);
2265-
ui_effects_dropdown->blockSignals(false);
2266-
effect = "";
2267-
}
22682261
}
22692262

22702263
if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::CUSTOM_BLIPS))
@@ -2304,6 +2297,14 @@ void Courtroom::reset_ui()
23042297
ui_sfx_remove->hide();
23052298
custom_sfx = "";
23062299
}
2300+
// Why was this in the IC enter key handler before...? Whatever. Hopefully putting it here instead doesn't break anything.
2301+
if (!Options::getInstance().clearEffectsDropdownOnPlayEnabled() && !ao_app->get_effect_property(effect, current_char, ao_app->read_char_ini(current_char, "effects", "Options"), "sticky").startsWith("true"))
2302+
{
2303+
ui_effects_dropdown->blockSignals(true);
2304+
ui_effects_dropdown->setCurrentIndex(0);
2305+
ui_effects_dropdown->blockSignals(false);
2306+
effect = "";
2307+
}
23072308
// If sticky preanims is disabled
23082309
if (!Options::getInstance().clearPreOnPlayEnabled())
23092310
{

0 commit comments

Comments
 (0)