mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-11 02:37:00 +00:00
Refactor to prepare for follow-on change
This commit is contained in:
parent
78839b69c3
commit
157e7e92e7
@ -66,9 +66,11 @@ struct DisplayState {
|
||||
|
||||
impl ApplicationHandler for DisplayState {
|
||||
fn resumed(&mut self, _: &ActiveEventLoop) {
|
||||
let viewer = self.viewer.get_or_insert_with(|| {
|
||||
block_on(Viewer::new(&self.window)).unwrap()
|
||||
});
|
||||
let window = &self.window;
|
||||
|
||||
let viewer = self
|
||||
.viewer
|
||||
.get_or_insert_with(|| block_on(Viewer::new(window)).unwrap());
|
||||
|
||||
if let Some(model) = self.model.take() {
|
||||
viewer.handle_model_update(model);
|
||||
|
Loading…
Reference in New Issue
Block a user