1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-26 20:28:50 -05:00

Merge pull request #5 from ozlb/patch-1

BOX-SELECTION HasFlag() missing
This commit is contained in:
Evan Pezent 2020-04-28 15:03:06 -05:00 committed by GitHub
commit 7d217904a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -727,7 +727,7 @@ bool BeginPlot(const char* title, const char* x_label, const char* y_label, cons
// confirm selection // confirm selection
if ((plot.Selecting || plot.Querying) && IO.MouseReleased[1]) { if ((plot.Selecting || plot.Querying) && IO.MouseReleased[1]) {
if (plot.Selecting && (plot.Flags, ImPlotFlags_Selection)) { if (plot.Selecting && HasFlag(plot.Flags, ImPlotFlags_Selection)) {
gp.UpdateTransforms(); gp.UpdateTransforms();
ImVec2 select_size = plot.SelectStart - IO.MousePos; ImVec2 select_size = plot.SelectStart - IO.MousePos;
if (ImFabs(select_size.x) > 2 && ImFabs(select_size.y) > 2) { if (ImFabs(select_size.x) > 2 && ImFabs(select_size.y) > 2) {