mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Some cell visualizer types not updating their values correctly
This commit is contained in:
@@ -1183,10 +1183,10 @@ namespace hex {
|
||||
};
|
||||
|
||||
UserData userData = {
|
||||
.data = &data,
|
||||
.maxChars = this->getMaxCharsPerCell(),
|
||||
.data = &data,
|
||||
.maxChars = this->getMaxCharsPerCell(),
|
||||
|
||||
.editingDone = false
|
||||
.editingDone = false
|
||||
};
|
||||
|
||||
ImGui::PushID(reinterpret_cast<void*>(address));
|
||||
@@ -1198,6 +1198,8 @@ namespace hex {
|
||||
if (data->BufTextLen >= userData.maxChars)
|
||||
userData.editingDone = true;
|
||||
|
||||
data->Buf[userData.maxChars] = 0x00;
|
||||
|
||||
return 0;
|
||||
}, &userData);
|
||||
ImGui::PopID();
|
||||
|
||||
@@ -381,6 +381,8 @@ namespace hex::ui {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
m_enteredEditingMode = false;
|
||||
}
|
||||
|
||||
m_editingBytes = buffer;
|
||||
@@ -419,6 +421,7 @@ namespace hex::ui {
|
||||
m_editingAddress = std::nullopt;
|
||||
else {
|
||||
m_editingAddress = nextEditingAddress;
|
||||
m_enteredEditingMode = true;
|
||||
|
||||
if (m_mode == Mode::Insert) {
|
||||
std::memset(m_editingBytes.data(), 0x00, size);
|
||||
@@ -449,8 +452,6 @@ namespace hex::ui {
|
||||
|
||||
if (!m_editingAddress.has_value())
|
||||
m_editingCellType = CellType::None;
|
||||
|
||||
m_enteredEditingMode = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user