summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2024-09-19 12:01:10 +0200
committerEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2024-09-19 12:01:10 +0200
commitb1784249d28da4d99908ff3e7f7eaa4212be1e47 (patch)
treeb3ee0d312517852206796a1a5c0c0d4586568e0d
parent902c54e53405f573282497d8257ab8aa120e99a9 (diff)
Fix merge race
-rw-r--r--crates/egui/src/ui.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs
index 97a45ef7..d56efbde 100644
--- a/crates/egui/src/ui.rs
+++ b/crates/egui/src/ui.rs
@@ -1023,9 +1023,9 @@ impl Ui {
/// It's [`Sense`] will be based on the [`UiBuilder::sense`] used to create this [`Ui`].
///
/// The rectangle of the [`Response`] (and interactive area) will be [`Self::min_rect`]
- /// of the last frame.
+ /// of the last pass.
///
- /// On the first frame, when the [`Ui`] is created, this will return a [`Response`] with a
+ /// The very first time when the [`Ui`] is created, this will return a [`Response`] with a
/// [`Rect`] of [`Rect::NOTHING`].
pub fn response(&self) -> Response {
// This is the inverse of Context::read_response. We prefer a response
@@ -1034,10 +1034,10 @@ impl Ui {
self.ctx()
.viewport(|viewport| {
viewport
- .prev_frame
+ .prev_pass
.widgets
.get(self.id)
- .or_else(|| viewport.this_frame.widgets.get(self.id))
+ .or_else(|| viewport.this_pass.widgets.get(self.id))
.copied()
})
.map(|widget_rect| self.ctx().get_response(widget_rect))
@@ -1053,7 +1053,7 @@ impl Ui {
// We remove the id from used_ids to prevent a duplicate id warning from showing
// when the ui was created with `UiBuilder::sense`.
// This is a bit hacky, is there a better way?
- self.ctx().frame_state_mut(|fs| {
+ self.ctx().pass_state_mut(|fs| {
fs.used_ids.remove(&self.id);
});
// This will update the WidgetRect that was first created in `Ui::new`.