forked from StudioInfinity/dyna3
AddRemove: make a button that adds elements
In the process, switch selection storage back to `FxHashSet`, reverting
commit b3afd6f
.
This commit is contained in:
parent
2444649dd1
commit
bd0982f821
4 changed files with 74 additions and 33 deletions
|
@ -4,6 +4,7 @@ mod display;
|
|||
mod outline;
|
||||
|
||||
use nalgebra::DVector;
|
||||
use rustc_hash::FxHashSet;
|
||||
use std::collections::BTreeSet;
|
||||
use sycamore::prelude::*;
|
||||
|
||||
|
@ -15,14 +16,14 @@ use outline::Outline;
|
|||
#[derive(Clone)]
|
||||
struct AppState {
|
||||
assembly: Assembly,
|
||||
selection: Signal<BTreeSet<usize>>
|
||||
selection: Signal<FxHashSet<usize>>
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
fn new() -> AppState {
|
||||
AppState {
|
||||
assembly: Assembly::new(),
|
||||
selection: create_signal(BTreeSet::default())
|
||||
selection: create_signal(FxHashSet::default())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue