1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Bug 2323 - Win/Mac: Screenshot tool: success/completion dialog is hidden/obscured by the Screenshot dialog

This commit is contained in:
Leland Lucius 2021-02-18 13:31:28 -06:00
parent 5ddf6d0037
commit db34fabb18

View File

@ -653,15 +653,21 @@ void ScreenshotBigDialog::DoCapture(int captureMode)
mCommand->mWhat = captureMode;
if (!mCommand->Apply(mContext))
mStatus->SetStatusText(_("Capture failed!"), mainStatusBarField);
Show();
// Bug 2323: (100% hackage alert) Since the command target dialog is not
// accessible from outside the command, this seems to be the only way we
// can get the window on top of this dialog.
wxWindow *w = wxFindWindowByLabel(XO("Long Message").Translation());
auto w = static_cast<wxDialogWrapper *>(wxFindWindowByLabel(XO("Long Message").Translation()));
if (w) {
w->SetWindowStyle(w->GetWindowStyle() | wxSTAY_ON_TOP);
auto endmodal = [w](wxCommandEvent &evt)
{
w->EndModal(0);
};
w->Bind(wxEVT_BUTTON, endmodal);
w->ShowModal();
}
Show();
}
void ScreenshotBigDialog::OnCaptureSomething(wxCommandEvent & event)