Skip to content

Commit

Permalink
Only update pixels_per_point when it has changed (#2352)
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter authored and emilk committed Dec 2, 2022
1 parent 10fbfa5 commit b849d6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/egui/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,8 @@ impl Context {
pub fn set_pixels_per_point(&self, pixels_per_point: f32) {
if pixels_per_point != self.pixels_per_point() {
self.request_repaint();
self.memory().new_pixels_per_point = Some(pixels_per_point);
}

self.memory().new_pixels_per_point = Some(pixels_per_point);
}

/// Useful for pixel-perfect rendering
Expand Down

0 comments on commit b849d6f

Please sign in to comment.