MCPcopy Create free account
hub / github.com/audacity/audacity / OnIdle

Method OnIdle

src/SpectralDataDialog.cpp:429–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429void SpectralDataDialogWorker::OnIdle(wxIdleEvent &evt)
430{
431 evt.Skip();
432 auto nViews = CountVisibleSpectralViews(mProject);
433 if (nViews > mPrevNViews) {
434 // Some track transitioned its view to spectral or multi.
435 // Show the dialog.
436 auto &dialog = SpectralDataDialog::Get(mProject);
437 dialog.Show();
438 dialog.Raise();
439 }
440 else if (nViews == 0 && mPrevNViews > 0) {
441 // The last spectrum view was closed.
442 // Hide the dialog.
443 if (auto pDialog = SpectralDataDialog::Find(&mProject))
444 pDialog->Hide();
445 }
446 mPrevNViews = nViews;
447}
448
449void SpectralDataDialog::DoToolChanged()
450{

Callers

nothing calls this directly

Calls 7

GetFunction · 0.85
FindFunction · 0.85
SkipMethod · 0.80
RaiseMethod · 0.80
ShowMethod · 0.45
HideMethod · 0.45

Tested by

no test coverage detected