Skip to content
Snippets Groups Projects

Do simulation in separate thread

Merged Oscar Gustafsson requested to merge threadedsim into master
Files
2
+ 3
2
@@ -86,6 +86,7 @@ class MainWindow(QMainWindow):
self.sfg_dict = {}
self._window = self
self.logger = logging.getLogger(__name__)
self._plot: Dict[Simulation, PlotWindow] = dict()
# Create Graphics View
self.graphic_view = QGraphicsView(self.scene, self)
@@ -754,8 +755,8 @@ class MainWindow(QMainWindow):
self._thread[sfg].start()
def _show_plot_window(self, sim: Simulation):
self._plot = PlotWindow(sim.results, sfg_name=sim._sfg.name)
self._plot.show()
self._plot[sim] = PlotWindow(sim.results, sfg_name=sim._sfg.name)
self._plot[sim].show()
def simulate_sfg(self, event=None) -> None:
self._simulation_dialog = SimulateSFGWindow(self)
Loading