MultiSelect: Box-Select: Fixed CTRL+drag from void clearing items.

This commit is contained in:
ocornut 2024-01-04 19:13:42 +01:00
parent 8312c75fef
commit 3141d87ef8
2 changed files with 2 additions and 1 deletions

View File

@ -9737,6 +9737,7 @@ struct ExampleAssetsBrowser
ImGui::SeparatorText("Layout");
ImGui::SliderFloat("Icon Size", &IconSize, 16.0f, 128.0f, "%.0f");
ImGui::SameLine(); HelpMarker("Use CTRL+Wheel to zoom");
ImGui::SliderInt("Icon Spacing", &IconSpacing, 0, 32);
ImGui::SliderInt("Icon Hit Spacing", &IconHitSpacing, 0, 32);
ImGui::Checkbox("Stretch Spacing", &StretchSpacing);

View File

@ -7180,7 +7180,7 @@ bool ImGui::BeginBoxSelect(ImGuiWindow* window, ImGuiID box_select_id, ImGuiMult
bs->Window = window;
bs->IsStarting = false;
SetActiveID(bs->ID, window);
if (bs->IsStartedFromVoid && (bs->KeyMods & ImGuiMod_Shift) == 0)
if (bs->IsStartedFromVoid && (bs->KeyMods & (ImGuiMod_Ctrl | ImGuiMod_Shift)) == 0)
bs->RequestClear = true;
}
else if ((bs->IsStarting || bs->IsActive) && g.IO.MouseDown[0] == false)