mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-20 17:41:13 +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:
committed by
James Crook
parent
adf243568b
commit
78cb554883
@@ -239,6 +239,17 @@ extern wxString AudacityMessageBoxCaptionStr()
|
|||||||
|
|
||||||
void AudacityTextEntryDialog::SetInsertionPointEnd()
|
void AudacityTextEntryDialog::SetInsertionPointEnd()
|
||||||
{
|
{
|
||||||
// m_textctrl is protected member of wxTextEntryDialog
|
mSetInsertionPointEnd = true;
|
||||||
m_textctrl->SetInsertionPointEnd();
|
}
|
||||||
|
|
||||||
|
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();
|
void SetInsertionPointEnd();
|
||||||
|
bool Show(bool show = true) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool mSetInsertionPointEnd{};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
|
Reference in New Issue
Block a user