Commit 2caad6b1 authored by dickelbeck's avatar dickelbeck
Browse files

beautify

parent 2a0fd4ef
Loading
Loading
Loading
Loading
+102 −98
Original line number Original line Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

// Name:        copy_to_clipboard.cpp
// Name:        copy_to_clipboard.cpp
// Author:      jean-pierre Charras
// Author:      jean-pierre Charras
// Created:     18 aug 2006
// Created:     18 aug 2006
@@ -33,6 +34,7 @@ static bool DrawPage(WinEDA_DrawPanel * panel);
/************************************************************/
/************************************************************/
void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event )
void WinEDA_DrawFrame::CopyToClipboard( wxCommandEvent& event )
/************************************************************/
/************************************************************/

/* calls the function to copy the current page or the current bock to the clipboard
/* calls the function to copy the current page or the current bock to the clipboard
 */
 */
{
{
@@ -41,23 +43,27 @@ void WinEDA_DrawFrame::CopyToClipboard(wxCommandEvent& event)
    if(  event.GetId() == ID_GEN_COPY_BLOCK_TO_CLIPBOARD )
    if(  event.GetId() == ID_GEN_COPY_BLOCK_TO_CLIPBOARD )
    {
    {
        if( GetScreen()->BlockLocate.m_Command != BLOCK_IDLE )
        if( GetScreen()->BlockLocate.m_Command != BLOCK_IDLE )
			DrawPanel->SetCursor(wxCursor(DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor) );
            DrawPanel->SetCursor( wxCursor( DrawPanel->m_PanelCursor =
                        DrawPanel->m_PanelDefaultCursor ) );


        if( DrawPanel->ManageCurseur && DrawPanel->ForceCloseManageCurseur )
        if( DrawPanel->ManageCurseur && DrawPanel->ForceCloseManageCurseur )
        {
        {
            wxClientDC dc( DrawPanel );
            wxClientDC dc( DrawPanel );

            DrawPanel->PrepareGraphicContext( &dc );
            DrawPanel->PrepareGraphicContext( &dc );
            DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
            DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
        }
        }
    }
    }
}
}



/*****************************************************************/
/*****************************************************************/
bool DrawPage( WinEDA_DrawPanel* panel )
bool DrawPage( WinEDA_DrawPanel* panel )
/*****************************************************************/
/*****************************************************************/

/* copy the current page or block to the clipboard ,
/* copy the current page or block to the clipboard ,
	to export drawings to other applications (word processing ...)
 * to export drawings to other applications (word processing ...)
	Thi is not suitable for copy command within eeschema or pcbnew
 * Thi is not suitable for copy command within eeschema or pcbnew
 */
 */
{
{
    bool    success = TRUE;
    bool    success = TRUE;
@@ -99,7 +105,6 @@ wxMetafileDC dc/*(wxT(""), DrawArea.GetWidth(), DrawArea.GetHeight())*/;
        DisplayError( NULL, wxT( "CopyToClipboard: DrawPage error: wxMetafileDC not OK" ) );
        DisplayError( NULL, wxT( "CopyToClipboard: DrawPage error: wxMetafileDC not OK" ) );
        success = FALSE;
        success = FALSE;
    }
    }

    else
    else
    {
    {
        EDA_Rect tmp = panel->m_ClipBox;
        EDA_Rect tmp = panel->m_ClipBox;
@@ -138,4 +143,3 @@ wxMetafileDC dc/*(wxT(""), DrawArea.GetWidth(), DrawArea.GetHeight())*/;


    return success;
    return success;
}
}