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

(cherry picked from commit 530b72972d)
This commit is contained in:
Huibean 2023-11-18 21:51:28 +08:00 committed by Jon Evans
parent 09bae9bb14
commit 22a6bf999f
1 changed files with 8 additions and 0 deletions

View File

@ -288,6 +288,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 )
SetSize( m_initialSize );