From 626c671448466afa730fb3f5f7abccc16b47697b Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Mon, 14 Dec 2020 08:28:04 -0500 Subject: [PATCH] Reset frame position when wxDisplay cannot find the matching display Fix #6732 --- common/eda_base_frame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index 25e5e575ce..c4a5854280 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -289,7 +289,10 @@ void EDA_BASE_FRAME::LoadSettings( wxConfigBase* aCfg ) int displayIndex = wxDisplay::GetFromPoint( m_FramePos ); if( displayIndex == wxNOT_FOUND ) + { displayIndex = 0; + m_FramePos = wxDefaultPosition; + } wxDisplay display( displayIndex ); wxRect clientSize = display.GetClientArea();