fix: drag-to-transfer drop not triggering transfer dialog
s_dropTargetIdx was reset to -1 unconditionally each frame, including the release frame. Since drop target detection runs in PASS 2 (after the drop handler), the target was always -1 when checked. Only reset while mouse button is held so the previous frame's value is preserved. Also bump version to 1.2.0-rc1 and add release notes.
This commit is contained in:
@@ -1557,8 +1557,9 @@ static void RenderSharedAddressList(App* app, float listH, float availW,
|
||||
bool mouseDown = ImGui::IsMouseDown(ImGuiMouseButton_Left);
|
||||
bool mouseClicked = ImGui::IsMouseClicked(ImGuiMouseButton_Left);
|
||||
|
||||
// Reset drop target each frame — it gets set only if mouse is over a row
|
||||
if (s_dragActive) s_dropTargetIdx = -1;
|
||||
// Reset drop target each frame — it gets set only if mouse is over a row.
|
||||
// Preserve the drop target on the release frame so the drop handler can use it.
|
||||
if (s_dragActive && mouseDown) s_dropTargetIdx = -1;
|
||||
|
||||
if (s_dragIdx >= 0 && !mouseDown) {
|
||||
// Mouse released — copy if it was a click (no drag activated)
|
||||
|
||||
Reference in New Issue
Block a user