mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -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 = {
|
UserData userData = {
|
||||||
.data = &data,
|
.data = &data,
|
||||||
.maxChars = this->getMaxCharsPerCell(),
|
.maxChars = this->getMaxCharsPerCell(),
|
||||||
|
|
||||||
.editingDone = false
|
.editingDone = false
|
||||||
};
|
};
|
||||||
|
|
||||||
ImGui::PushID(reinterpret_cast<void*>(address));
|
ImGui::PushID(reinterpret_cast<void*>(address));
|
||||||
@@ -1198,6 +1198,8 @@ namespace hex {
|
|||||||
if (data->BufTextLen >= userData.maxChars)
|
if (data->BufTextLen >= userData.maxChars)
|
||||||
userData.editingDone = true;
|
userData.editingDone = true;
|
||||||
|
|
||||||
|
data->Buf[userData.maxChars] = 0x00;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}, &userData);
|
}, &userData);
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
|
|||||||
@@ -381,6 +381,8 @@ namespace hex::ui {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_enteredEditingMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_editingBytes = buffer;
|
m_editingBytes = buffer;
|
||||||
@@ -419,6 +421,7 @@ namespace hex::ui {
|
|||||||
m_editingAddress = std::nullopt;
|
m_editingAddress = std::nullopt;
|
||||||
else {
|
else {
|
||||||
m_editingAddress = nextEditingAddress;
|
m_editingAddress = nextEditingAddress;
|
||||||
|
m_enteredEditingMode = true;
|
||||||
|
|
||||||
if (m_mode == Mode::Insert) {
|
if (m_mode == Mode::Insert) {
|
||||||
std::memset(m_editingBytes.data(), 0x00, size);
|
std::memset(m_editingBytes.data(), 0x00, size);
|
||||||
@@ -449,8 +452,6 @@ namespace hex::ui {
|
|||||||
|
|
||||||
if (!m_editingAddress.has_value())
|
if (!m_editingAddress.has_value())
|
||||||
m_editingCellType = CellType::None;
|
m_editingCellType = CellType::None;
|
||||||
|
|
||||||
m_enteredEditingMode = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user