clear_variables

This commit is contained in:
Martin Kavík 2024-06-16 18:29:25 +02:00
parent a299ae1082
commit 4807b1bde5
6 changed files with 98 additions and 27 deletions

View file

@ -17,6 +17,13 @@ enum Layout {
Columns,
}
#[derive(Default)]
struct Store {
selected_var_refs: MutableVec<wellen::VarRef>,
}
static STORE: Lazy<Store> = lazy::default();
fn main() {
start_app("app", root);
Task::start(async {
@ -28,7 +35,7 @@ fn main() {
fn root() -> impl Element {
let hierarchy: Mutable<Option<Rc<wellen::Hierarchy>>> = <_>::default();
let selected_var_refs: MutableVec<wellen::VarRef> = <_>::default();
let selected_var_refs = STORE.selected_var_refs.clone();
let layout: Mutable<Layout> = <_>::default();
Column::new()
.s(Height::fill())