Commit 709fe07e authored by jean-pierre charras's avatar jean-pierre charras

All: fix a very minor issue: when a window is closed mazimized, and later...

All: fix a very minor issue: when a window is closed mazimized, and later reopened, it was not maximized.
parent 3b55948d
......@@ -113,6 +113,7 @@ void EDA_BASE_FRAME::LoadSettings()
config = wxGetApp().m_EDA_Config;
int maximized = 0;
if( config )
{
text = m_FrameName + wxT( "Pos_x" );
......@@ -123,6 +124,8 @@ void EDA_BASE_FRAME::LoadSettings()
config->Read( text, &m_FrameSize.x, 600 );
text = m_FrameName + wxT( "Size_y" );
config->Read( text, &m_FrameSize.y, 400 );
text = m_FrameName + wxT( "Maximized" );
config->Read( text, &maximized, 0 );
}
// Ensure Window title bar is visible
......@@ -135,6 +138,9 @@ void EDA_BASE_FRAME::LoadSettings()
#endif
if( m_FramePos.y < Ypos_min )
m_FramePos.y = Ypos_min;
if( maximized )
Maximize();
}
......@@ -166,6 +172,8 @@ void EDA_BASE_FRAME::SaveSettings()
config->Write( text, (long) m_FrameSize.x );
text = m_FrameName + wxT( "Size_y" );
config->Write( text, (long) m_FrameSize.y );
text = m_FrameName + wxT( "Maximized" );
config->Write( text, IsMaximized() );
}
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010)
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010)
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......
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