mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-23 15:50:05 +02:00
Merge pull request #167 from tip2tail/mMessageFix
Thanks Mark. Looks good to me and tests fine on Linux and Mac.
This commit is contained in:
commit
ce1f587feb
@ -1069,7 +1069,7 @@ void ProgressDialog::Init()
|
||||
}
|
||||
|
||||
// Add a new text column each time this is called.
|
||||
void ProgressDialog::AddMessageAsColumn(wxBoxSizer * pSizer, const wxString & sText) {
|
||||
void ProgressDialog::AddMessageAsColumn(wxBoxSizer * pSizer, const wxString & sText, bool bFirstColumn) {
|
||||
|
||||
// Assuming that we don't want empty columns, bail out if there is no text.
|
||||
if (sText.IsEmpty())
|
||||
@ -1086,6 +1086,12 @@ void ProgressDialog::AddMessageAsColumn(wxBoxSizer * pSizer, const wxString & sT
|
||||
wxALIGN_LEFT);
|
||||
oText->SetName(sText); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||
|
||||
// If this is the first column then set the mMessage pointer so non-TimerRecord usages
|
||||
// will still work correctly
|
||||
if (bFirstColumn) {
|
||||
mMessage = oText;
|
||||
}
|
||||
|
||||
pSizer->Add(oText, 1, wxEXPAND | wxALL, 5);
|
||||
}
|
||||
|
||||
@ -1125,7 +1131,8 @@ bool ProgressDialog::Create(const wxString & title,
|
||||
auto colSizer = uColSizer.get();
|
||||
|
||||
for (size_t column = 0; column < arMessages.GetCount(); column++) {
|
||||
AddMessageAsColumn(colSizer, arMessages[column]);
|
||||
bool bFirstCol = (column == 0);
|
||||
AddMessageAsColumn(colSizer, arMessages[column], bFirstCol);
|
||||
}
|
||||
|
||||
// and put message column(s) into a main vertical sizer.
|
||||
|
@ -113,7 +113,7 @@ private:
|
||||
const wxString & sTitle,
|
||||
int iButtonID = -1);
|
||||
|
||||
void AddMessageAsColumn(wxBoxSizer * pSizer, const wxString & sText);
|
||||
void AddMessageAsColumn(wxBoxSizer * pSizer, const wxString & sText, bool bFirstColumn);
|
||||
|
||||
private:
|
||||
// This guarantees we have an active event loop...possible during OnInit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user