Commit e4923e72 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

fix save dialogs on Mac #268

In MainFrame::ShowModal, which is used as a wrapper for
wxDialog::ShowModal to also pause emulation, add the current window
style flags to the additional CAPTION and RESIZE_BORDER flags being set
with SetWindowStyle(), otherwise the other style flags of the window are
reset causing erroneous behavior such as save dialogs appearing as open
dialogs on Mac.
parent 66a50e35
......@@ -896,7 +896,7 @@ void MainFrame::SetMenusOpened(bool state)
// uses dialog_opened as a nesting counter
int MainFrame::ShowModal(wxDialog* dlg)
{
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
dlg->SetWindowStyle(dlg->GetWindowStyle() | wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
dlg->SetWindowStyle(dlg->GetWindowStyle() | wxSTAY_ON_TOP);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment