1
0
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:
lllucius@gmail.com 2011-01-25 04:50:02 +00:00
parent 337695ee19
commit 7d889359c5
3 changed files with 11 additions and 5 deletions

View File

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

View File

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

View File

@ -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();