Checkpoint: Fix downcasting
This commit is contained in:
parent
f50a23accd
commit
c7fc5f3ab7
5 changed files with 65 additions and 43 deletions
|
@ -81,6 +81,7 @@ impl<'a, 'w> WindowContext<'a, 'w> {
|
|||
}
|
||||
|
||||
pub(crate) fn draw(&mut self) -> Result<()> {
|
||||
dbg!("Draw");
|
||||
let unit_entity = self.unit_entity.clone();
|
||||
self.update_entity(&unit_entity, |_, cx| {
|
||||
let mut root_view = cx.window.root_view.take().unwrap();
|
||||
|
@ -90,6 +91,7 @@ impl<'a, 'w> WindowContext<'a, 'w> {
|
|||
.layout_engine
|
||||
.compute_layout(root_layout_id, available_space)?;
|
||||
let layout = cx.window.layout_engine.layout(root_layout_id)?;
|
||||
dbg!("Paint root view");
|
||||
root_view.paint(layout, &mut (), &mut frame_state, cx)?;
|
||||
cx.window.root_view = Some(root_view);
|
||||
let scene = cx.window.scene.take();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue