mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
revert accidental changes
This commit is contained in:
@@ -161,13 +161,14 @@ impl MenuState {
|
|||||||
if state.last_visible_pass + 1 < pass_nr {
|
if state.last_visible_pass + 1 < pass_nr {
|
||||||
state.open_item = None;
|
state.open_item = None;
|
||||||
}
|
}
|
||||||
if let Some(item) = state.open_item
|
if let Some(item) = state.open_item {
|
||||||
&& data
|
if data
|
||||||
.get_temp(item.with(Self::ID))
|
.get_temp(item.with(Self::ID))
|
||||||
.is_none_or(|item: Self| item.last_visible_pass + 1 < pass_nr)
|
.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
|
// If the open item wasn't shown for at least a frame, reset the open item
|
||||||
state.open_item = None;
|
state.open_item = None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let r = f(&mut state);
|
let r = f(&mut state);
|
||||||
data.insert_temp(state_id, state);
|
data.insert_temp(state_id, state);
|
||||||
|
|||||||
@@ -1272,7 +1272,8 @@ impl Areas {
|
|||||||
pub fn top_layer_id(&self, order: Order) -> Option<LayerId> {
|
pub fn top_layer_id(&self, order: Order) -> Option<LayerId> {
|
||||||
self.order
|
self.order
|
||||||
.iter()
|
.iter()
|
||||||
.rfind(|layer| layer.order == order && !self.is_sublayer(layer))
|
.filter(|layer| layer.order == order && !self.is_sublayer(layer))
|
||||||
|
.next_back()
|
||||||
.copied()
|
.copied()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ pub enum Shape {
|
|||||||
|
|
||||||
/// Recursively nest more shapes - sometimes a convenience to be able to do.
|
/// Recursively nest more shapes - sometimes a convenience to be able to do.
|
||||||
/// For performance reasons it is better to avoid it.
|
/// For performance reasons it is better to avoid it.
|
||||||
Vec(Vec<Self>),
|
Vec(Vec<Shape>),
|
||||||
|
|
||||||
/// Circle with optional outline and fill.
|
/// Circle with optional outline and fill.
|
||||||
Circle(CircleShape),
|
Circle(CircleShape),
|
||||||
|
|||||||
Reference in New Issue
Block a user