summaryrefslogtreecommitdiffstats
path: root/native/src/widget/pane_grid/state.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-01-07 21:07:44 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-01-07 21:07:44 +0100
commite7344d03b467e87b3e50fa8d7ecd74994b46a4e6 (patch)
tree387bbdc78c0d20cbc3943343573164d0a92bc724 /native/src/widget/pane_grid/state.rs
parent31522e30aa1436f634a2675ba69d12495ff672bc (diff)
downloadiced-e7344d03b467e87b3e50fa8d7ecd74994b46a4e6.tar.gz
iced-e7344d03b467e87b3e50fa8d7ecd74994b46a4e6.tar.bz2
iced-e7344d03b467e87b3e50fa8d7ecd74994b46a4e6.zip
Use `BTreeMap` for splits and regions in `pane_grid`
This preserves ordering between calls to update and draw logic.
Diffstat (limited to 'native/src/widget/pane_grid/state.rs')
-rw-r--r--native/src/widget/pane_grid/state.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs
index 666e1ca0..fb96f89f 100644
--- a/native/src/widget/pane_grid/state.rs
+++ b/native/src/widget/pane_grid/state.rs
@@ -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)
}