Skip to content

Commit d2caf4c

Browse files
committed
fix scheduling edge-case
1 parent 69f822c commit d2caf4c

5 files changed

Lines changed: 62 additions & 444 deletions

File tree

src/app_ui.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use eframe::egui::{
66
};
77
use eframe::epaint::Color32;
88
use egui_plot::{HLine, Legend, Plot, PlotBounds, PlotImage, PlotPoint, PlotTransform, PlotUi, VLine};
9-
use evalexpr::{EvalexprFloat, Stack};
9+
use evalexpr::{EvalexprFloat, Stack, istr};
1010
use serde::{Deserialize, Serialize};
1111

1212
use crate::builtins::{init_builtins, show_builtin_information};
@@ -660,11 +660,14 @@ pub fn graph_panel<T: EvalexprFloat>(
660660
ui_state.plot_mouese_pos = plot_res.response.hover_pos();
661661
state.graph_state.prev_plot_transform = Some(plot_res.transform);
662662

663+
// println!("new frame");
663664
if force_create_elements || changed {
664665
// println!("Scheduling element creation because force {force_create_elements} changed {changed}");
665666
if !ui_state.debug_info.pause_redraw {
666667
ui_state.debug_info.plot_bounds = Some(*plot_res.transform.bounds());
667668
scope!("schedule_entry_create_plot_elements");
669+
670+
668671
ui_state.eval_errors.clear();
669672
let plot_params = entry::PlotParams::new::<T>(ui_state, &state.graph_state);
670673
let main_context = Arc::new(state.ctx.clone());

0 commit comments

Comments
 (0)