Force the view switcher dialog to always be centered on the window

The dialog isn't actually movable with the mouse, so all the placement
logic inside DIALOG_SHIM is extraneous and actually causes the switcher
to appear on the wrong monitor if pcbnew was moved across monitors after
it was opened.

Fixes https://gitlab.com/kicad/code/kicad/issues/5789
This commit is contained in:
Ian McInerney 2020-10-17 20:54:28 +01:00
parent e832a94a9c
commit c0d381e588
1 changed files with 5 additions and 0 deletions

View File

@ -70,8 +70,13 @@ bool EDA_VIEW_SWITCHER::Show( bool aShow )
bool ret = DIALOG_SHIM::Show( aShow ); bool ret = DIALOG_SHIM::Show( aShow );
if( aShow ) if( aShow )
{
m_receivingEvents = true; m_receivingEvents = true;
// Force the dialog to always be centered over the window
Centre();
}
return ret; return ret;
} }