1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Bytes not automatically being focused in editing mode anymore

This commit is contained in:
WerWolv 2023-12-26 23:43:11 +01:00
parent 483325990c
commit 87155f98b3

View File

@ -190,11 +190,6 @@ namespace hex::ui {
}
}
else {
if (m_enteredEditingMode) {
ImGui::SetKeyboardFocusHere();
ImGui::SetNextFrameWantCaptureKeyboard(true);
}
bool shouldExitEditingMode = true;
if (cellType == m_editingCellType && cellType == CellType::Hex) {
std::vector<u8> buffer = m_editingBytes;
@ -212,6 +207,11 @@ namespace hex::ui {
shouldExitEditingMode = asciiVisualizer.drawEditing(*m_editingAddress, m_editingBytes.data(), m_editingBytes.size(), m_upperCaseHex, m_enteredEditingMode);
}
if (ImGui::IsWindowFocused()) {
ImGui::SetKeyboardFocusHere(-1);
ImGui::SetNextFrameWantCaptureKeyboard(true);
}
if (shouldExitEditingMode || m_shouldModifyValue) {
{
std::vector<u8> oldData(m_editingBytes.size());