Add frame window monitor display index compare with saved dialog and centre it if display changed which caused dialog disapper

This commit is contained in:
Huibean 2023-11-18 21:51:28 +08:00 committed by Jon Evans
parent 4defa6b58f
commit 530b72972d
1 changed files with 8 additions and 0 deletions

View File

@ -292,6 +292,14 @@ bool DIALOG_SHIM::Show( bool show )
std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
0 );
}
#ifdef __WXMAC__
if( m_parent != nullptr )
{
if( wxDisplay::GetFromPoint( m_parent->GetPosition() )
!= wxDisplay::GetFromPoint( savedDialogRect.GetPosition() ) )
Centre();
}
#endif
}
else if( m_initialSize != wxDefaultSize )
{