Skip to content

Commit

Permalink
Center & raise AskPermissionDialog on app window (#264)
Browse files Browse the repository at this point in the history
Handle AskPermissionDialog the same ways as the main window is handled:
that is, when it is time to show it, center it on the hosting
application and raise it to the top.

---------

Co-authored-by: Vladimir M. Zenevich <[email protected]>
Co-authored-by: Václav Slavík <[email protected]>
  • Loading branch information
3 people authored Nov 18, 2024
1 parent 4c74b89 commit 41e6eb5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,8 @@ void App::OnUpdateAvailable(wxThreadEvent& event)
void App::OnAskForPermission(wxThreadEvent& event)
{
AskPermissionDialog dlg;
CenterWindowOnHostApplication(&dlg);
dlg.Raise();
bool shouldCheck = (dlg.ShowModal() == wxID_OK);

Settings::WriteConfigValue("CheckForUpdates", shouldCheck);
Expand Down

0 comments on commit 41e6eb5

Please sign in to comment.