From 3d273210d227ac5b078440dadf743ab71ea2c460 Mon Sep 17 00:00:00 2001 From: Petter <petter.kallstrom@liu.se> Date: Fri, 17 Feb 2023 16:00:01 +0100 Subject: [PATCH] Main_window now uses PlotWindow instead of Plot --- b_asic/GUI/main_window.py | 8 ++++++-- b_asic/GUI/plot_window.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/b_asic/GUI/main_window.py b/b_asic/GUI/main_window.py index 18a32548..a80f171a 100644 --- a/b_asic/GUI/main_window.py +++ b/b_asic/GUI/main_window.py @@ -33,10 +33,13 @@ from b_asic.GUI._preferences import GAP, GRID, MINBUTTONSIZE, PORTHEIGHT from b_asic.GUI.arrow import Arrow from b_asic.GUI.drag_button import DragButton from b_asic.GUI.gui_interface import Ui_main_window +from b_asic.GUI.plot_window import PlotWindow from b_asic.GUI.port_button import PortButton from b_asic.GUI.select_sfg_window import SelectSFGWindow from b_asic.GUI.show_pc_window import ShowPCWindow -from b_asic.GUI.simulate_sfg_window import Plot, SimulateSFGWindow + +# from b_asic.GUI.simulate_sfg_window import Plot, SimulateSFGWindow +from b_asic.GUI.simulate_sfg_window import SimulateSFGWindow from b_asic.GUI.util_dialogs import FaqWindow, KeybindsWindow from b_asic.GUI.utils import decorate_class, handle_error from b_asic.gui_utils.about_window import AboutWindow @@ -716,7 +719,8 @@ class MainWindow(QMainWindow): self.logger.info( "To save the plot press 'Ctrl+S' when the plot is focused." ) - self.plot = Plot(simulation, sfg, self) + # self.plot = Plot(simulation, sfg, self) + self.plot = PlotWindow(simulation.results) self.plot.show() def simulate_sfg(self, event=None): diff --git a/b_asic/GUI/plot_window.py b/b_asic/GUI/plot_window.py index 5939f6c0..02485110 100644 --- a/b_asic/GUI/plot_window.py +++ b/b_asic/GUI/plot_window.py @@ -1,6 +1,6 @@ # TODO's: # * Solve the legend update. That isn't working at all. -# * Make it work with the main_window +# * Zoom etc. Might need to change FigureCanvas. Or just something very little. import re import sys -- GitLab