1
0
mirror of synced 2025-01-19 01:24:15 +01:00

fix: Crash when dragging the mouse onto the hex view

This commit is contained in:
WerWolv 2022-09-28 21:39:46 +02:00
parent b33dd5d4f5
commit 08a12dd2b0

View File

@ -1160,12 +1160,12 @@ namespace hex::plugin::builtin {
auto &selectionStart = ProviderExtraData::getCurrent().editor.selectionStart;
if (ImGui::IsMouseDragging(ImGuiMouseButton_Left)) {
this->setSelection(*selectionStart, endAddress);
this->setSelection(selectionStart.value_or(address), endAddress);
this->scrollToSelection();
}
else if (ImGui::IsMouseDown(ImGuiMouseButton_Left)) {
if (ImGui::GetIO().KeyShift)
this->setSelection(*selectionStart, endAddress);
this->setSelection(selectionStart.value_or(address), endAddress);
else
this->setSelection(address, endAddress);