From 7545d970527fe9ce31ed76606eae9fb892208b9e Mon Sep 17 00:00:00 2001 From: Aaron Holtzman <77404441+aholtzma-am@users.noreply.github.com> Date: Fri, 24 May 2024 12:39:01 -0400 Subject: [PATCH] Force use of min_auto_bounds if auto_bounds is disabled by default This fixes #3893. --- crates/egui_plot/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui_plot/src/lib.rs b/crates/egui_plot/src/lib.rs index 164710bef26..28a4c208392 100644 --- a/crates/egui_plot/src/lib.rs +++ b/crates/egui_plot/src/lib.rs @@ -975,10 +975,10 @@ impl<'a> Plot<'a> { } // Reset bounds to initial bounds if they haven't been modified. - if mem.auto_bounds.x { + if !default_auto_bounds.x || mem.auto_bounds.x { bounds.set_x(&min_auto_bounds); } - if mem.auto_bounds.y { + if !default_auto_bounds.y || mem.auto_bounds.y { bounds.set_y(&min_auto_bounds); }