diff options
| author | Osmium Sorcerer <os@sof.beauty> | 2026-03-22 17:38:19 +0000 |
|---|---|---|
| committer | Osmium Sorcerer <os@sof.beauty> | 2026-03-29 22:22:25 +0000 |
| commit | ec3cf52e24ca53cc339bef32bc2288c3b57d52df (patch) | |
| tree | 4b88d7996c4cec506dfbe3d7f9cd47791a30d8fb /src | |
| parent | 3f7e0a684a513ce4d6ba4f6f1533794c6d6cdc0d (diff) | |
Allow saving character side in update_character
This fixes "Reload theme" button resetting position.
Diffstat (limited to 'src')
| -rw-r--r-- | src/courtroom.cpp | 9 | ||||
| -rw-r--r-- | src/courtroom.h | 2 |
2 files changed, 7 insertions, 4 deletions
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()) { diff --git a/src/courtroom.h b/src/courtroom.h index 095d0ea..6114c35 100644 --- a/src/courtroom.h +++ b/src/courtroom.h @@ -175,7 +175,7 @@ public: // updates character to p_cid and updates necessary ui elements // Optional "char_name" is the iniswap we're using - void update_character(int p_cid, QString char_name = QString(), bool reset_emote = false); + void update_character(int p_cid, QString char_name = QString(), bool reset_emote = false, bool reset_pos = true); // properly sets up some varibles: resets user state void enter_courtroom(); |
