fix: Crash when dragging the mouse onto the hex view
This commit is contained in:
parent
b33dd5d4f5
commit
08a12dd2b0
@ -1160,12 +1160,12 @@ namespace hex::plugin::builtin {
|
|||||||
auto &selectionStart = ProviderExtraData::getCurrent().editor.selectionStart;
|
auto &selectionStart = ProviderExtraData::getCurrent().editor.selectionStart;
|
||||||
|
|
||||||
if (ImGui::IsMouseDragging(ImGuiMouseButton_Left)) {
|
if (ImGui::IsMouseDragging(ImGuiMouseButton_Left)) {
|
||||||
this->setSelection(*selectionStart, endAddress);
|
this->setSelection(selectionStart.value_or(address), endAddress);
|
||||||
this->scrollToSelection();
|
this->scrollToSelection();
|
||||||
}
|
}
|
||||||
else if (ImGui::IsMouseDown(ImGuiMouseButton_Left)) {
|
else if (ImGui::IsMouseDown(ImGuiMouseButton_Left)) {
|
||||||
if (ImGui::GetIO().KeyShift)
|
if (ImGui::GetIO().KeyShift)
|
||||||
this->setSelection(*selectionStart, endAddress);
|
this->setSelection(selectionStart.value_or(address), endAddress);
|
||||||
else
|
else
|
||||||
this->setSelection(address, endAddress);
|
this->setSelection(address, endAddress);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user