1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

revert accidental changes

This commit is contained in:
Emil Ernerfeldt
2025-11-16 15:40:48 -08:00
parent 3ea92e8240
commit 5d5de946c4
3 changed files with 9 additions and 7 deletions

View File

@@ -161,13 +161,14 @@ impl MenuState {
if state.last_visible_pass + 1 < pass_nr {
state.open_item = None;
}
if let Some(item) = state.open_item
&& data
if let Some(item) = state.open_item {
if data
.get_temp(item.with(Self::ID))
.is_none_or(|item: Self| item.last_visible_pass + 1 < pass_nr)
{
// If the open item wasn't shown for at least a frame, reset the open item
state.open_item = None;
{
// If the open item wasn't shown for at least a frame, reset the open item
state.open_item = None;
}
}
let r = f(&mut state);
data.insert_temp(state_id, state);

View File

@@ -1272,7 +1272,8 @@ impl Areas {
pub fn top_layer_id(&self, order: Order) -> Option<LayerId> {
self.order
.iter()
.rfind(|layer| layer.order == order && !self.is_sublayer(layer))
.filter(|layer| layer.order == order && !self.is_sublayer(layer))
.next_back()
.copied()
}

View File

@@ -30,7 +30,7 @@ pub enum Shape {
/// Recursively nest more shapes - sometimes a convenience to be able to do.
/// For performance reasons it is better to avoid it.
Vec(Vec<Self>),
Vec(Vec<Shape>),
/// Circle with optional outline and fill.
Circle(CircleShape),