Current workflow for spectral editing dialog: 1. ProjectSettings change event listened by Worker::OnToolChanged() 2. In Worker::OnToolChanged(), get Dialog from AttachedWindows and invoke Show() 3. Dialog::OnApply() listens to the apply button in Dialog, which calculates and applies the effect
| 364 | // 2. In Worker::OnToolChanged(), get Dialog from AttachedWindows and invoke Show() |
| 365 | // 3. Dialog::OnApply() listens to the apply button in Dialog, which calculates and applies the effect |
| 366 | SpectralDataDialogWorker::SpectralDataDialogWorker(AudacityProject &project) |
| 367 | : mProject{ project } |
| 368 | { |
| 369 | mSettingsSubscription = ProjectSettings::Get(project) |
| 370 | .Subscribe(*this, &SpectralDataDialogWorker::OnToolChanged); |
| 371 | wxTheApp->Bind(wxEVT_IDLE, &SpectralDataDialogWorker::OnIdle, this); |
| 372 | } |
| 373 | |
| 374 | SpectralDataDialogWorker::~SpectralDataDialogWorker() |
| 375 | { |