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

Method OnInitDialog

src/effects/EffectUI.cpp:495–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493
494
495void EffectUIHost::OnInitDialog(wxInitDialogEvent & evt)
496{
497 // Do default handling
498 wxDialogWrapper::OnInitDialog(evt);
499
500#if wxCHECK_VERSION(3, 0, 0)
501 //#warning "check to see if this still needed in wx3"
502#endif
503
504 // Pure hackage coming down the pike...
505 //
506 // I have no idea why, but if a wxTextCtrl is the first control in the
507 // panel, then its contents will not be automatically selected when the
508 // dialog is displayed.
509 //
510 // So, we do the selection manually.
511 wxTextCtrl *focused = wxDynamicCast(FindFocus(), wxTextCtrl);
512 if (focused)
513 {
514 focused->SelectAll();
515 }
516}
517
518void EffectUIHost::OnErase(wxEraseEvent & WXUNUSED(evt))
519{

Callers

nothing calls this directly

Calls 2

FindFocusFunction · 0.85
SelectAllMethod · 0.80

Tested by

no test coverage detected