From ec3cf52e24ca53cc339bef32bc2288c3b57d52df Mon Sep 17 00:00:00 2001 From: Osmium Sorcerer Date: Sun, 22 Mar 2026 17:38:19 +0000 Subject: Allow saving character side in update_character This fixes "Reload theme" button resetting position. --- src/courtroom.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/courtroom.cpp') diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 82caddd..a199777 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1492,7 +1492,7 @@ void Courtroom::set_pos_dropdown(QStringList pos_dropdowns) ui_pos_dropdown->setCurrentText(current_pos); } -void Courtroom::update_character(int p_cid, QString char_name, bool reset_emote) +void Courtroom::update_character(int p_cid, QString char_name, bool reset_emote, bool reset_pos) { bool newchar = m_cid != p_cid; @@ -1523,7 +1523,10 @@ void Courtroom::update_character(int p_cid, QString char_name, bool reset_emote) } current_char = f_char; - set_side(ao_app->get_char_side(current_char)); + if (reset_pos) + { + set_side(ao_app->get_char_side(current_char)); + } set_text_color_dropdown(); @@ -6450,7 +6453,7 @@ void Courtroom::on_reload_theme_clicked() { set_courtroom_size(); set_widgets(); - update_character(m_cid, ui_iniswap_dropdown->itemText(ui_iniswap_dropdown->currentIndex())); + update_character(m_cid, ui_iniswap_dropdown->itemText(ui_iniswap_dropdown->currentIndex()), false, false); enter_courtroom(); if (Options::getInstance().customChatboxEnabled()) { -- cgit