diff options
Diffstat (limited to 'native/src/widget/pane_grid/state.rs')
-rw-r--r-- | native/src/widget/pane_grid/state.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs index 6a282d24..4e90f645 100644 --- a/native/src/widget/pane_grid/state.rs +++ b/native/src/widget/pane_grid/state.rs @@ -66,6 +66,11 @@ impl<T> State<T> { self.panes.len() } + /// Returns `true` if the amount of panes in the [`State`] is 0. + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + /// Returns the internal state of the given [`Pane`], if it exists. pub fn get(&self, pane: &Pane) -> Option<&T> { self.panes.get(pane) |