list editor: get_data_port() make map on list instead of seq
This commit is contained in:
parent
6ed456e3ff
commit
7f18fd7755
1 changed files with 3 additions and 3 deletions
|
@ -162,9 +162,9 @@ impl ListEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_data_port(&self) -> OuterViewPort<dyn SequenceView<Item = EditTree>> {
|
pub fn get_data_port(&self) -> OuterViewPort<dyn SequenceView<Item = EditTree>> {
|
||||||
self.data.get_port().to_sequence().map(
|
self.data.get_port().to_list().map(
|
||||||
|x| x.read().unwrap().clone()
|
|x| x.read().unwrap().clone()
|
||||||
)
|
).to_sequence()
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
pub fn get_data(&self) -> Arc<RwLock<ReprTree>> {
|
pub fn get_data(&self) -> Arc<RwLock<ReprTree>> {
|
||||||
|
@ -186,7 +186,7 @@ impl ListEditor {
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_item_mut(&mut self) -> Option<MutableVecAccess<Arc<RwLock<EditTree>>>> {
|
pub fn get_item_mut(&mut self) -> Option<MutableVecAccess<Arc<RwLock<EditTree>>>> {
|
||||||
if let Some(idx) = self.cursor.get().idx {
|
if let Some(idx) = self.cursor.get().idx {
|
||||||
|
|
Loading…
Reference in a new issue