Use BTreeMap for splits and regions in pane_grid
This preserves ordering between calls to update and draw logic.
This commit is contained in:
parent
31522e30aa
commit
e7344d03b4
4 changed files with 12 additions and 12 deletions
|
|
@ -3,7 +3,7 @@ use crate::{
|
|||
Hasher, Point, Rectangle, Size,
|
||||
};
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
|
||||
/// The state of a [`PaneGrid`].
|
||||
///
|
||||
|
|
@ -257,7 +257,7 @@ impl Internal {
|
|||
&self,
|
||||
spacing: f32,
|
||||
size: Size,
|
||||
) -> HashMap<Pane, Rectangle> {
|
||||
) -> BTreeMap<Pane, Rectangle> {
|
||||
self.layout.pane_regions(spacing, size)
|
||||
}
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ impl Internal {
|
|||
&self,
|
||||
spacing: f32,
|
||||
size: Size,
|
||||
) -> HashMap<Split, (Axis, Rectangle, f32)> {
|
||||
) -> BTreeMap<Split, (Axis, Rectangle, f32)> {
|
||||
self.layout.split_regions(spacing, size)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue