fix: All bytes being selected when opening a new provider

This commit is contained in:
WerWolv 2023-01-30 10:10:37 +01:00
parent 434ced44f0
commit d6bb408078
1 changed files with 5 additions and 3 deletions

View File

@ -894,9 +894,11 @@ namespace hex::plugin::builtin {
auto selection = this->m_hexEditor.getSelection();
oldData.selectionStart = selection.getStartAddress();
oldData.selectionEnd = selection.getEndAddress();
oldData.scrollPosition = this->m_hexEditor.getScrollPosition();
if (selection != Region::Invalid()) {
oldData.selectionStart = selection.getStartAddress();
oldData.selectionEnd = selection.getEndAddress();
oldData.scrollPosition = this->m_hexEditor.getScrollPosition();
}
}
if (newProvider != nullptr) {