Merge pull request #538 from AttorneyOnline/fix/showname-enable

Fix shownames disappearing forever if a message is sent while the shownames checkbox is unticked
This commit is contained in:
oldmud0 2021-04-23 01:58:55 -05:00 committed by GitHub
commit 93c8befece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2067,11 +2067,6 @@ void Courtroom::log_chatmessage(QString f_message, int f_char_id, QString f_show
if (f_char_id != -1) {
// Grab the char.ini showname
f_showname = ao_app->get_showname(char_list.at(f_char_id).name);
// If custom serversided shownames are not enabled
if (!ui_showname_enable->isChecked()) {
// Set the display name to the char.ini showname
f_displayname = f_showname;
}
}
// If display name is just whitespace, use the char.ini showname.
if (f_displayname.trimmed().isEmpty())
@ -2171,6 +2166,8 @@ void Courtroom::log_chatmessage(QString f_message, int f_char_id, QString f_show
append_ic_text(f_message, f_displayname, "",f_color);
break;
}
if (!ui_showname_enable->isChecked())
regenerate_ic_chatlog();
}
bool Courtroom::handle_objection()