@@ -369,15 +369,7 @@ impl Engine {
369369 } ) ;
370370
371371 if let Pen :: Typewriter ( typewriter) = self . penholder . current_pen_ref ( ) {
372- typewriter. refresh_spellcheck_cache_in_modifying_stroke ( & mut EngineViewMut {
373- tasks_tx : self . tasks_tx . clone ( ) ,
374- pens_config : & mut self . pens_config ,
375- document : & mut self . document ,
376- store : & mut self . store ,
377- camera : & mut self . camera ,
378- audioplayer : & mut self . audioplayer ,
379- spellcheck : & mut self . spellcheck ,
380- } ) ;
372+ typewriter. refresh_spellcheck_cache_in_modifying_stroke ( & mut engine_view_mut ! ( self ) ) ;
381373
382374 widget_flags. redraw = true ;
383375 }
@@ -387,15 +379,8 @@ impl Engine {
387379
388380 pub fn get_spellcheck_corrections ( & self ) -> Option < Vec < String > > {
389381 if let Pen :: Typewriter ( typewriter) = self . penholder . current_pen_ref ( ) {
390- return typewriter. get_spellcheck_correction_in_modifying_stroke ( & mut EngineView {
391- tasks_tx : self . tasks_tx . clone ( ) ,
392- pens_config : & self . pens_config ,
393- document : & self . document ,
394- store : & self . store ,
395- camera : & self . camera ,
396- audioplayer : & self . audioplayer ,
397- spellcheck : & self . spellcheck ,
398- } ) ;
382+ return typewriter
383+ . get_spellcheck_correction_in_modifying_stroke ( & mut engine_view ! ( self ) ) ;
399384 }
400385
401386 None
@@ -405,15 +390,7 @@ impl Engine {
405390 if let Pen :: Typewriter ( typewriter) = self . penholder . current_pen_mut ( ) {
406391 return typewriter. apply_spellcheck_correction_in_modifying_stroke (
407392 correction,
408- & mut EngineViewMut {
409- tasks_tx : self . tasks_tx . clone ( ) ,
410- pens_config : & mut self . pens_config ,
411- document : & mut self . document ,
412- store : & mut self . store ,
413- camera : & mut self . camera ,
414- audioplayer : & mut self . audioplayer ,
415- spellcheck : & mut self . spellcheck ,
416- } ,
393+ & mut engine_view_mut ! ( self ) ,
417394 ) ;
418395 }
419396
0 commit comments