From d483ac47ba05311cbb2098e27f31a89450b3560f Mon Sep 17 00:00:00 2001 From: Felix Wiegand Date: Wed, 9 Aug 2023 11:08:04 +0200 Subject: [PATCH] Fix auto_bounds when only one axis has restricted navigation (#3171) --- crates/egui/src/widgets/plot/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/widgets/plot/mod.rs b/crates/egui/src/widgets/plot/mod.rs index c5db9199..8f04be4f 100644 --- a/crates/egui/src/widgets/plot/mod.rs +++ b/crates/egui/src/widgets/plot/mod.rs @@ -864,7 +864,7 @@ impl Plot { delta.y = 0.0; } transform.translate_bounds(delta); - bounds_modified = true.into(); + bounds_modified = allow_drag; } // Zooming @@ -935,7 +935,7 @@ impl Plot { } if zoom_factor != Vec2::splat(1.0) { transform.zoom(zoom_factor, hover_pos); - bounds_modified = true.into(); + bounds_modified = allow_zoom; } } if allow_scroll {