mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 17:09:26 +02:00
Start of fix for Bug #1221
This commit is contained in:
parent
31fc2c14e4
commit
38551d8e49
@ -152,9 +152,9 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
wxString name = mChains->GetItemText(item);
|
wxString name = mChains->GetItemText(item);
|
||||||
|
|
||||||
wxDialog d(this, wxID_ANY, GetTitle(), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxWS_EX_TRANSIENT);
|
wxDialog * pD = new wxDialog(this, wxID_ANY, GetTitle());
|
||||||
d.SetName(d.GetTitle());
|
pD->SetName(pD->GetTitle());
|
||||||
ShuttleGui S(&d, eIsCreating);
|
ShuttleGui S(pD, eIsCreating);
|
||||||
|
|
||||||
S.StartHorizontalLay(wxCENTER, false);
|
S.StartHorizontalLay(wxCENTER, false);
|
||||||
{
|
{
|
||||||
@ -168,23 +168,13 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
d.Layout();
|
pD->Layout();
|
||||||
d.Fit();
|
pD->Fit();
|
||||||
d.CenterOnScreen();
|
pD->CenterOnScreen();
|
||||||
d.Move(-1, 0);
|
pD->Move(-1, 0);
|
||||||
d.Show();
|
pD->Show();
|
||||||
d.Update();
|
|
||||||
|
|
||||||
// It seems that wxWidgets (3.0.2) exhibits different behavior for Windows and Linux
|
|
||||||
// than it does for OSX when calling Hide(). (See bug #1221 for symptoms)
|
|
||||||
//
|
|
||||||
// So, as a workaround, just move the dialog offscreen.
|
|
||||||
#if !defined(__WXMAC__)
|
|
||||||
wxPoint pos = GetPosition();
|
|
||||||
Move(14000, 14000);
|
|
||||||
#else
|
|
||||||
Hide();
|
Hide();
|
||||||
#endif
|
|
||||||
|
|
||||||
gPrefs->Write(wxT("/Batch/ActiveChain"), name);
|
gPrefs->Write(wxT("/Batch/ActiveChain"), name);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
@ -193,20 +183,18 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
|
|||||||
|
|
||||||
// The disabler must get deleted before the EndModal() call. Otherwise,
|
// The disabler must get deleted before the EndModal() call. Otherwise,
|
||||||
// the menus on OSX will remain disabled.
|
// the menus on OSX will remain disabled.
|
||||||
wxWindowDisabler *wd = new wxWindowDisabler(&d);
|
wxWindowDisabler *wd = new wxWindowDisabler(pD);
|
||||||
bool success = mBatchCommands.ApplyChain();
|
bool success = mBatchCommands.ApplyChain();
|
||||||
delete wd;
|
delete wd;
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
#if !defined(__WXMAC__)
|
|
||||||
Move(pos);
|
|
||||||
#else
|
|
||||||
Show();
|
Show();
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// pD->Destroy();
|
||||||
EndModal(wxID_OK);
|
wxCloseEvent Evt;
|
||||||
|
Evt.SetEventObject( this);
|
||||||
|
ProcessWindowEvent( Evt );
|
||||||
}
|
}
|
||||||
|
|
||||||
void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user