mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 12:03:42 +01:00
craft-ui-panels: InDock and Arrangement derive MemoProps
A memoized view keys on every app value its scope sets; the dock's InDock value feeds its arrangement (dock id and revision).
This commit is contained in:
1 parent
c832163e10
commit
f15c3ea8ee
1 file changed
+2
-2
@@ -410,7 +410,7 @@ impl<P: Clone + Eq + Hash + Send + 'static> DropTarget<GroupDrag<P>> for DockDro
|
||||
}
|
||||
|
||||
/// The arrangement a dock drag started on: the dock area and the revision of the workspace it showed.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, crate::contract::MemoProps)]
|
||||
#[doc(hidden)]
|
||||
pub struct Arrangement {
|
||||
pub dock: Id,
|
||||
@@ -418,7 +418,7 @@ pub struct Arrangement {
|
||||
}
|
||||
|
||||
/// The env value a dock area puts into its body: the arrangement it shows. `None` outside a dock area.
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq, crate::contract::MemoProps)]
|
||||
struct InDock(Option<Arrangement>);
|
||||
|
||||
impl EnvValue for InDock {
|
||||
|
||||
Reference in new issue
Block a user