mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Use currently selected timeformat (in SelectionBar) as default for Label dialog
This commit is contained in:
parent
337695ee19
commit
7d889359c5
@ -94,7 +94,8 @@ LabelDialog::LabelDialog(wxWindow *parent,
|
||||
DirManager *dirmanager,
|
||||
TrackList *tracks,
|
||||
ViewInfo &viewinfo,
|
||||
double rate)
|
||||
double rate,
|
||||
const wxString & format)
|
||||
: wxDialog(parent,
|
||||
wxID_ANY,
|
||||
_("Edit Labels"),
|
||||
@ -104,7 +105,8 @@ LabelDialog::LabelDialog(wxWindow *parent,
|
||||
mDirManager(dirmanager),
|
||||
mTracks(tracks),
|
||||
mViewInfo(&viewinfo),
|
||||
mRate(rate)
|
||||
mRate(rate),
|
||||
mFormat(format)
|
||||
{
|
||||
// Create the main sizer
|
||||
wxBoxSizer *vs = new wxBoxSizer(wxVERTICAL);
|
||||
|
@ -37,7 +37,8 @@ class LabelDialog:public wxDialog
|
||||
DirManager *dirmanager,
|
||||
TrackList *tracks,
|
||||
ViewInfo &viewinfo,
|
||||
double rate);
|
||||
double rate,
|
||||
const wxString & format);
|
||||
~LabelDialog();
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
@ -5413,8 +5413,11 @@ void AudacityProject::OnAddLabelPlaying()
|
||||
|
||||
void AudacityProject::OnEditLabels()
|
||||
{
|
||||
LabelDialog dlg(this, mDirManager, mTracks, mViewInfo, mRate);
|
||||
|
||||
wxString format;
|
||||
gPrefs->Read(wxT("/SelectionFormat"), &format);
|
||||
|
||||
LabelDialog dlg(this, mDirManager, mTracks, mViewInfo, mRate, format);
|
||||
|
||||
if (dlg.ShowModal() == wxID_OK) {
|
||||
PushState(_("Edited labels"), _("Label"));
|
||||
RedrawProject();
|
||||
|
Loading…
x
Reference in New Issue
Block a user