Browse Source

ColorPicker: Fix assertion when running in a collapsed window and dragging its title bar (#2389)

pull/2400/head
omar 6 years ago
parent
commit
1c67d09c0b
  1. 2
      docs/CHANGELOG.txt
  2. 4
      imgui_widgets.cpp

2
docs/CHANGELOG.txt

@ -54,6 +54,8 @@ Other Changes:
- InputText: Fixed various display corruption related to swapping the underlying buffer while
a input widget is active (both for writable and read-only paths). Often they would manifest
when manipulating the scrollbar of a multi-line input text.
- ColorPicker: Fixed a bug/assertion when displaying a color picker in a collapsed window
while dragging its title bar. (#2389)
- TabBar: Fixed a crash when using BeginTabBar() recursively (didn't affect docking). (#2371)
- TabBar: Added extra mis-usage error recovery. Past the assert, common mis-usage don't lead to
hard crashes any more, facilitating integration with scripting languages. (#1651)

4
imgui_widgets.cpp

@ -4219,8 +4219,10 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = GetCurrentWindow();
ImDrawList* draw_list = window->DrawList;
if (window->SkipItems)
return false;
ImDrawList* draw_list = window->DrawList;
ImGuiStyle& style = g.Style;
ImGuiIO& io = g.IO;

Loading…
Cancel
Save