Simulation: Can't change analysis type

Description

When you select a type of simulation, let say transient, and run the simulation, changing it back to say AC simulation and running doesn't work. It still runs for the previous analysis type. You have to close the simulation window and do everything from scratch.

Steps to reproduce

Run a transient simulation, without closing the simulation window, run an AC simulation

KiCad Version

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.0.2, release build

Libraries: wxWidgets 3.2.2 FreeType 2.12.1 HarfBuzz 5.2.0 FontConfig 2.14.1 libcurl/7.86.0-DEV OpenSSL/3.0.8 zlib/1.2.13 nghttp2/1.52.0

Platform: Linux 5.19.0-44-generic x86_64, 64 bit, Little endian, wxGTK, gnome, wayland

Build Info: Date: May 17 2023 01:52:11 wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24 Boost: 1.82.0 OCC: 7.7.1 Curl: 7.86.0-DEV ngspice: 40 Compiler: GCC 12.2.0 with C++ ABI 1017

Build settings: KICAD_SPICE=ON

Edited by Coşku Baş