From 6235ecdea4358370e559554fb469935922b1c1cd Mon Sep 17 00:00:00 2001 From: Jacob Wahlman <jacwa448@student.liu.se> Date: Wed, 13 May 2020 17:55:36 +0200 Subject: [PATCH] added save for plot --- b_asic/GUI/simulate_sfg_window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/b_asic/GUI/simulate_sfg_window.py b/b_asic/GUI/simulate_sfg_window.py index 75d26120..48e584dc 100644 --- a/b_asic/GUI/simulate_sfg_window.py +++ b/b_asic/GUI/simulate_sfg_window.py @@ -114,7 +114,7 @@ class Plot(FigureCanvas): self._plot_values_sfg() def _save_plot_figure(self): - self._window.logger.info(f"Saving plot of figure: {self.sfg.name}") + self._window.logger.info(f"Saving plot of figure: {self.sfg.name}.") file_choices = "PNG (*.png)|*.png" path, ext = QFileDialog.getSaveFileName(self, "Save file", "", file_choices) path = path.encode("utf-8") @@ -123,6 +123,7 @@ class Plot(FigureCanvas): if path: self.print_figure(path.decode(), dpi=self.dpi) + self._window.logger.info(f"Saved plot: {self.sfg.name} to path: {path}.") def _plot_values_sfg(self): x_axis = list(range(len(self.simulation.results.keys()))) -- GitLab