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 {
|
impl ApplicationHandler for DisplayState {
|
||||||
fn resumed(&mut self, _: &ActiveEventLoop) {
|
fn resumed(&mut self, _: &ActiveEventLoop) {
|
||||||
let viewer = self.viewer.get_or_insert_with(|| {
|
let window = &self.window;
|
||||||
block_on(Viewer::new(&self.window)).unwrap()
|
|
||||||
});
|
let viewer = self
|
||||||
|
.viewer
|
||||||
|
.get_or_insert_with(|| block_on(Viewer::new(window)).unwrap());
|
||||||
|
|
||||||
if let Some(model) = self.model.take() {
|
if let Some(model) = self.model.take() {
|
||||||
viewer.handle_model_update(model);
|
viewer.handle_model_update(model);
|
||||||
|
Loading…
Reference in New Issue
Block a user