Skip to content

Commit

Permalink
Revert "Don't persist Area state (#4577)"
Browse files Browse the repository at this point in the history
This reverts commit 66f40de.
  • Loading branch information
emilk committed Jul 1, 2024
1 parent 0fc79ae commit a49d0d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions crates/egui/src/containers/area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ use crate::*;
///
/// Areas back [`crate::Window`]s and other floating containers,
/// like tooltips and the popups of [`crate::ComboBox`].
///
/// Area state is intentionally NOT persisted between sessions,
/// so that a bad tooltip or menu size won't be remembered forever.
/// A resizable [`Window`] remembers the size the user picked using
/// the state in the [`Resize`] container.
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct AreaState {
/// Last known position of the pivot.
pub pivot_pos: Pos2,
Expand Down
3 changes: 0 additions & 3 deletions crates/egui/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,6 @@ impl Memory {
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "serde", serde(default))]
pub struct Areas {
/// Area state is intentionally NOT persisted between sessions,
/// so that a bad tooltip or menu size won't be remembered forever.
#[cfg_attr(feature = "serde", serde(skip))]
areas: IdMap<area::AreaState>,

/// Back-to-front. Top is last.
Expand Down

0 comments on commit a49d0d2

Please sign in to comment.