pub fn update_selected<'a>(&mut self, selected: impl Iterator<Item = &'a [LayerId]>, document: &DocumentMessageHandler, responses: &mut VecDeque<Message>) {
		let mut old_overlay_paths = std::mem::take(&mut self.selected_overlay_paths);

		for document_layer_path in selected {
			if let Some(overlay_path) = Self::create_outline(document_layer_path.to_vec(), old_overlay_paths.pop(), document, responses) {
				self.selected_overlay_paths.push(overlay_path);
			}
		}
		for path in old_overlay_paths {
			let operation = Operation::DeleteLayer { path };
			responses.push_back(DocumentMessage::Overlays(operation.into()).into());
		}
	}
/// Updates the selected overlays, generating or removing overlays if necessary
Updates the selected overlays, generating or removing overlays if necessary
Updates the selected overlays generating or removing overlays if necessary
pub fn update_selected<'a>(&mut self, selected: impl Iterator<Item = &'a [LayerId]>, document: &DocumentMessageHandler, responses: &mut VecDeque<Message>) {
		let mut old_overlay_paths = std::mem::take(&mut self.selected_overlay_paths);
		for document_layer_path in selected {
			if let Some(overlay_path) = Self::create_outline(document_layer_path.to_vec(), old_overlay_paths.pop(), document, responses) {
				self.selected_overlay_paths.push(overlay_path);
			}
		}
		for path in old_overlay_paths {
			let operation = Operation::DeleteLayer { path };
			responses.push_back(DocumentMessage::Overlays(operation.into()).into());
		}
	}
pub fn update_selected < ' a > ( & mut self , selected : impl Iterator < Item = & ' a [ LayerId ] > , document : & DocumentMessageHandler , responses : & mut VecDeque < Message > ) { let mut old_overlay_paths = std :: mem :: take ( & mut self . selected_overlay_paths ) ; for document_layer_path in selected { if let Some ( overlay_path ) = Self :: create_outline ( document_layer_path . to_vec ( ) , old_overlay_paths . pop ( ) , document , responses ) { self . selected_overlay_paths . push ( overlay_path ) ; } } for path in old_overlay_paths { let operation = Operation :: DeleteLayer { path } ; responses . push_back ( DocumentMessage :: Overlays ( operation . into ( ) ) . into ( ) ) ; } }
Updates the selected overlays, generating or removing overlays if necessary
Updates the selected overlays generating or removing overlays if necessary
&mut self
selected
impl Iterator<Item = &'a [LayerId]>
document
&DocumentMessageHandler
responses
&mut VecDeque<Message>
&mut self
selected
impl Iterator<Item = &'a [LayerId]>
document
&DocumentMessageHandler
responses
&mut VecDeque<Message>