Skip to content

Commit

Permalink
Fix bug causing wrong-fire of ViewportCommand::Visible (#5244)
Browse files Browse the repository at this point in the history
Fix: variable name issue

I'm not sure, if there's any particular reason to do `self.active` .
I thought `self.visible` was the original intention.
  • Loading branch information
rustbasic authored Oct 10, 2024
1 parent 7bd6f83 commit 23728e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ impl ViewportBuilder {
}

if let Some(new_visible) = new_visible {
if Some(new_visible) != self.active {
if Some(new_visible) != self.visible {
self.visible = Some(new_visible);
commands.push(ViewportCommand::Visible(new_visible));
}
Expand Down

0 comments on commit 23728e1

Please sign in to comment.