1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

HexEditor: Add ASCII to the value inspector

This is kind of redundant but probably easier to read than the ASCII
column. Also, it seems appropriate after we add other character
encodings.
This commit is contained in:
kleines Filmröllchen 2022-04-12 18:59:23 +02:00 committed by Linus Groh
parent da7a8a8711
commit e5736cdf2f
2 changed files with 6 additions and 0 deletions

View file

@ -285,9 +285,11 @@ void HexEditorWidget::update_inspector_values(size_t position)
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::SignedByte, String::number(static_cast<i8>(unsigned_byte_value)));
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UnsignedByte, String::number(unsigned_byte_value));
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::ASCII, String::formatted("{:c}", static_cast<char>(unsigned_byte_value)));
} else {
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::SignedByte, "");
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UnsignedByte, "");
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::ASCII, "");
}
if (byte_read_count >= 2) {