All: fix a very minor issue: when a window is closed mazimized, and later reopened, it was not maximized.

This commit is contained in:
jean-pierre charras 2011-04-05 21:24:12 +02:00
parent 3b55948db2
commit 709fe07e6d
4 changed files with 1048 additions and 3 deletions

View File

@ -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() );
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// 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!

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// 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!
@ -110,7 +110,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
public:
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 777,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 777,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DESIGN_RULES_BASE();
};