Application prototype #14
@ -49,7 +49,7 @@ impl Assembly {
|
||||
}
|
||||
|
||||
pub fn try_insert_element(&self, elt: Element) -> bool {
|
||||
let can_insert = self.elements_by_id.with(
|
||||
let can_insert = self.elements_by_id.with_untracked(
|
||||
|elts_by_id| !elts_by_id.contains_key(&elt.id)
|
||||
);
|
||||
if can_insert {
|
||||
@ -62,7 +62,7 @@ impl Assembly {
|
||||
// find the next unused identifier in the default sequence
|
||||
let mut id_num = 1;
|
||||
let mut id = format!("sphere{}", id_num);
|
||||
while self.elements_by_id.with(
|
||||
while self.elements_by_id.with_untracked(
|
||||
|elts_by_id| elts_by_id.contains_key(&id)
|
||||
) {
|
||||
id_num += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user