mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-22 15:38:02 +02:00
In Grid fix accessibility names of cells to handle frequencies.
In commit 9c687f0, TimeEditors etc were generalized to handle both times and frequencies. This fixes the accessibility names of cells to handle frequencies.
This commit is contained in:
parent
12d22cafc6
commit
176a977617
@ -769,30 +769,30 @@ wxAccStatus GridAx::GetName(int childId, wxString *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hack to provide a more intelligible response
|
// Hack to provide a more intelligible response
|
||||||
TimeEditor *d =
|
NumericEditor *dt =
|
||||||
(TimeEditor *)mGrid->GetDefaultEditorForType(GRID_VALUE_TIME);
|
static_cast<NumericEditor *>(mGrid->GetDefaultEditorForType(GRID_VALUE_TIME));
|
||||||
TimeEditor *c =
|
NumericEditor *df =
|
||||||
(TimeEditor *)mGrid->GetCellEditor(row, col);
|
static_cast<NumericEditor *>(mGrid->GetDefaultEditorForType(GRID_VALUE_FREQUENCY));
|
||||||
|
NumericEditor *c =
|
||||||
|
static_cast<NumericEditor *>(mGrid->GetCellEditor(row, col));
|
||||||
|
|
||||||
if (c && d && c == d) {
|
if (c && dt && df && ( c == dt || c == df)) {
|
||||||
double value;
|
double value;
|
||||||
v.ToDouble(&value);
|
v.ToDouble(&value);
|
||||||
|
NumericConverter converter(c == dt ? NumericConverter::TIME : NumericConverter::FREQUENCY,
|
||||||
|
c->GetFormat(),
|
||||||
|
value,
|
||||||
|
c->GetRate() );
|
||||||
|
|
||||||
NumericTextCtrl tt(NumericConverter::TIME, mGrid,
|
v = converter.GetString();
|
||||||
wxID_ANY,
|
|
||||||
c->GetFormat(),
|
|
||||||
value,
|
|
||||||
c->GetRate(),
|
|
||||||
wxPoint(10000, 10000), // create offscreen
|
|
||||||
wxDefaultSize,
|
|
||||||
true);
|
|
||||||
v = tt.GetString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c)
|
if (c)
|
||||||
c->DecRef();
|
c->DecRef();
|
||||||
if (d)
|
if (dt)
|
||||||
d->DecRef();
|
dt->DecRef();
|
||||||
|
if (df)
|
||||||
|
df->DecRef();
|
||||||
|
|
||||||
*name = n + wxT(" ") + v;
|
*name = n + wxT(" ") + v;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user