From 436e7f1ef575a83da98da9529bf79ba318f677c8 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 24 Feb 2022 12:32:21 -0500 Subject: [PATCH] fix parsing error --- src/egui_app.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/egui_app.rs b/src/egui_app.rs index 959b381..bbb426d 100644 --- a/src/egui_app.rs +++ b/src/egui_app.rs @@ -135,17 +135,18 @@ impl epi::App for MathApp { ); }); - let do_update = - chart_manager.update(func_str.clone(), *min_x, *max_x, *num_interval, *resolution); + if parse_error.is_empty() { + let do_update = chart_manager.update(func_str.clone(), *min_x, *max_x, *num_interval, *resolution); - match do_update { - UpdateType::FULL => { - back_cache.invalidate(); - front_cache.invalidate(); + match do_update { + UpdateType::FULL => { + back_cache.invalidate(); + front_cache.invalidate(); + } + UpdateType::BACK => back_cache.invalidate(), + UpdateType::FRONT => front_cache.invalidate(), + _ => {} } - UpdateType::BACK => back_cache.invalidate(), - UpdateType::FRONT => front_cache.invalidate(), - _ => {} } egui::CentralPanel::default().show(ctx, |ui| {