Skip to content

Commit

Permalink
Only update pixels_per_point when it has changed (emilk#2352)
Browse files Browse the repository at this point in the history
  • Loading branch information
lampsitter authored and JohannesProgrammiert committed Jan 21, 2023
1 parent 6533693 commit 6848881
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 6848881

Please # to comment.