From 397fc05ca8e39aceeb27799f344359411f1494a1 Mon Sep 17 00:00:00 2001 From: Evan Pezent Date: Sun, 26 Jul 2020 21:39:17 -0500 Subject: [PATCH] fix bug in IsPlotYAxisHovered --- implot.cpp | 2 +- implot_demo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/implot.cpp b/implot.cpp index a6160f1..21e4389 100644 --- a/implot.cpp +++ b/implot.cpp @@ -1918,7 +1918,7 @@ bool IsPlotYAxisHovered(int y_axis_in) { const int y_axis = y_axis_in >= 0 ? y_axis_in : gp.CurrentPlot->CurrentYAxis; ImRect bb_plot_pad = gp.BB_Plot; bb_plot_pad.Min.x += 5; bb_plot_pad.Max.x -= 5; - return gp.CurrentPlot->YAxis[y_axis].Hovered && !!bb_plot_pad.Contains(ImGui::GetMousePos()); + return gp.CurrentPlot->YAxis[y_axis].Hovered && !bb_plot_pad.Contains(ImGui::GetMousePos()); } ImPlotPoint GetPlotMousePos(int y_axis_in) { diff --git a/implot_demo.cpp b/implot_demo.cpp index 08f266c..9a034e7 100644 --- a/implot_demo.cpp +++ b/implot_demo.cpp @@ -719,7 +719,7 @@ void ShowDemoWindow(bool* p_open) { } init = false; } - ImGui::BulletText("Drag data items from the left column onto the plot or onto y axis"); + ImGui::BulletText("Drag data items from the left column onto the plot or onto a specific y-axis."); ImGui::BeginGroup(); if (ImGui::Button("Clear", ImVec2(100, 0))) { for (int i = 0; i < K_CHANNELS; ++i) {