Ejemplo n.º 1
0
void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
    int px, py;

    UpdateFileHistory( m_ProjectFileName.GetFullPath() );

    if( !IsIconized() )   // save main frame position and size
    {
        GetPosition( &px, &py );
        m_FramePos.x = px;
        m_FramePos.y = py;

        GetSize( &px, &py );
        m_FrameSize.x = px;
        m_FrameSize.y = py;
    }

    Event.SetCanVeto( true );

    // Close the help frame
    if( wxGetApp().GetHtmlHelpController() )
    {
        if( wxGetApp().GetHtmlHelpController()->GetFrame() ) // returns NULL if no help frame active
            wxGetApp().GetHtmlHelpController()->GetFrame()->Close( true );

        wxGetApp().SetHtmlHelpController( NULL );
    }

    m_LeftWin->Show( false );

    Destroy();
}
Ejemplo n.º 2
0
void KICAD_MANAGER_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
    if( Kiway.PlayersClose( false ) )
    {
        int px, py;

        UpdateFileHistory( GetProjectFileName(), &Pgm().GetFileHistory() );

        if( !IsIconized() )   // save main frame position and size
        {
            GetPosition( &px, &py );
            m_FramePos.x = px;
            m_FramePos.y = py;

            GetSize( &px, &py );
            m_FrameSize.x = px;
            m_FrameSize.y = py;
        }

        Event.SetCanVeto( true );

        m_LeftWin->Show( false );

        Destroy();
    }
}
Ejemplo n.º 3
0
void WinEDA_MainFrame::OnCloseWindow(wxCloseEvent & Event)
/**********************************************************/
{
int px, py;

	SetLastProject(m_PrjFileName);

	if ( ! IsIconized() )
		{
		/* Memorisation position sur l'ecran */
		GetPosition(&px, &py);
		m_FramePos.x = px;
		m_FramePos.y = py;

		/* Memorisation dimension de la fenetre */
		GetSize(&px, &py);
		m_FrameSize.x = px;
		m_FrameSize.y = py;
		}

	Event.SetCanVeto(TRUE);

	SaveSettings();

	// Close the help frame
	if ( m_Parent->m_HtmlCtrl )
		{
		if ( m_Parent->m_HtmlCtrl->GetFrame() ) // returns NULL if no help frame active
			m_Parent->m_HtmlCtrl->GetFrame()->Close(TRUE);
		m_Parent->m_HtmlCtrl = NULL;
		}

	Destroy();
}