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:
David Bailes 2019-04-12 09:39:14 +01:00 committed by James Crook
parent adf243568b
commit 78cb554883
2 changed files with 17 additions and 2 deletions

View File

@ -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;
}

View File

@ -97,6 +97,10 @@ public:
{}
void SetInsertionPointEnd();
bool Show(bool show = true) override;
private:
bool mSetInsertionPointEnd{};
};
/**************************************************************************//**