mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
2092: Linux: first typed char lost when using dialog for label name
Fix: Move the insertion point to the end of the text after the dialog is shown.
This commit is contained in:
parent
adf243568b
commit
78cb554883
@ -239,6 +239,17 @@ extern wxString AudacityMessageBoxCaptionStr()
|
||||
|
||||
void AudacityTextEntryDialog::SetInsertionPointEnd()
|
||||
{
|
||||
// m_textctrl is protected member of wxTextEntryDialog
|
||||
m_textctrl->SetInsertionPointEnd();
|
||||
mSetInsertionPointEnd = true;
|
||||
}
|
||||
|
||||
bool AudacityTextEntryDialog::Show(bool show)
|
||||
{
|
||||
bool ret = wxTabTraversalWrapper< wxTextEntryDialog >::Show(show);
|
||||
|
||||
if (show && mSetInsertionPointEnd) {
|
||||
// m_textctrl is protected member of wxTextEntryDialog
|
||||
m_textctrl->SetInsertionPointEnd();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -97,6 +97,10 @@ public:
|
||||
{}
|
||||
|
||||
void SetInsertionPointEnd();
|
||||
bool Show(bool show = true) override;
|
||||
|
||||
private:
|
||||
bool mSetInsertionPointEnd{};
|
||||
};
|
||||
|
||||
/**************************************************************************//**
|
||||
|
Loading…
x
Reference in New Issue
Block a user