diff --git a/app.py b/app.py index cdad18b..f6d3cf8 100644 --- a/app.py +++ b/app.py @@ -162,6 +162,8 @@ def open_file(self, file_name=None, file_dir=None): if error: self.output_console.print_output(error["msg"]) + mpl_plot_vertical = self.findChild(MplPlotVertical, "mpl_plot_vertical") + if isinstance(plot_data, PlotPoints): self.plot_points = plot_data self.output_console.print_output( @@ -174,13 +176,16 @@ def open_file(self, file_name=None, file_dir=None): if not mpl_plot_vertical: self.add_vertical_settings() mpl_plot_vertical = self.findChild(MplPlotVertical, "mpl_plot_vertical") - mpl_plot_vertical.set_new_file( - filename=self.plot_horizo.filename.split("/")[-1] - ) + self.output_console.print_output( f"{len(self.plot_horizo.names)} functions." ) + if mpl_plot_vertical: + mpl_plot_vertical.set_new_file( + filename=self.plot_horizo.filename.split("/")[-1] + ) + self.canvas_plot.update_plot() self.last_file_open = file_to_open