Browse Source

Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes related to the addition of IsItemDeactivated()). (#1875, #143)

omar 7 years ago
parent
commit
c790723cfa
2 changed files with 3 additions and 1 deletions
  1. 2 0
      CHANGELOG.txt
  2. 1 1
      imgui.cpp

+ 2 - 0
CHANGELOG.txt

@@ -44,6 +44,8 @@ Other Changes:
  - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
  - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
  - Window: Added global io.OptResizeWindowsFromEdges option to enable resizing windows from their edges and from the lower-left corner. (#1495)
+ - Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes 
+   related to the addition of IsItemDeactivated()). (#1875, #143)
  - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut] 
  - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
  - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)

+ 1 - 1
imgui.cpp

@@ -2299,7 +2299,7 @@ void ImGui::MarkItemValueChanged(ImGuiID id)
     // ActiveId might have been released by the time we call this (as in the typical press/release button behavior) but still need need to fill the data.
     (void)id; // Avoid unused variable warnings when asserts are compiled out.
     ImGuiContext& g = *GImGui;
-    IM_ASSERT(g.ActiveId == id || g.ActiveId == 0);
+    IM_ASSERT(g.ActiveId == id || g.ActiveId == 0 || g.DragDropActive);
     g.ActiveIdValueChanged = true;
 }