Commit 1a139a7f authored by stambaughw's avatar stambaughw
Browse files

More comment translation and capitalization fixes.

parent 0acb404f
Loading
Loading
Loading
Loading
+71 −77
Original line number Original line Diff line number Diff line
/***********************************************************************/
/************************************************/
/* menubarmodedit.cpp - creation du menu general de l'editeur de module*/
/* menubarmodedit.cpp - Module editor menu bar. */
/***********************************************************************/
/************************************************/


#include "fctsys.h"
#include "fctsys.h"
#include "common.h"
#include "common.h"
@@ -13,13 +13,7 @@
#include "pcbnew_id.h"
#include "pcbnew_id.h"





/***********************************************/
void WinEDA_ModuleEditFrame::ReCreateMenuBar()
void WinEDA_ModuleEditFrame::ReCreateMenuBar()
/***********************************************/

/* Cree ou reinitialise le menu du haut d'ecran
*/
{
{
    wxMenuBar*  menuBar = GetMenuBar();
    wxMenuBar*  menuBar = GetMenuBar();
    wxMenuItem* item;
    wxMenuItem* item;
@@ -28,9 +22,6 @@ wxMenuItem * item;
    {
    {
        menuBar = new wxMenuBar();
        menuBar = new wxMenuBar();


		/////////////////////////////
		// Ajustage de dimensions: //
		/////////////////////////////
        wxMenu* sizes_menu = new wxMenu;
        wxMenu* sizes_menu = new wxMenu;


        item = new wxMenuItem( sizes_menu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
        item = new wxMenuItem( sizes_menu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
@@ -40,12 +31,14 @@ wxMenuItem * item;
        sizes_menu->Append( item );
        sizes_menu->Append( item );


        item = new wxMenuItem( sizes_menu, ID_PCB_PAD_SETUP, _( "Pad Settings" ),
        item = new wxMenuItem( sizes_menu, ID_PCB_PAD_SETUP, _( "Pad Settings" ),
			_("Adjust size,shape,layers... for Pads"));
                               _( "Adjust size, shape, layers... for pads" ) );
        item->SetBitmap( pad_xpm );
        item->SetBitmap( pad_xpm );
        sizes_menu->Append( item );
        sizes_menu->Append( item );


		item = new wxMenuItem(sizes_menu, ID_PCB_USER_GRID_SETUP, _("User Grid Size"),
        item =
			_("Adjust User Grid"));
            new wxMenuItem( sizes_menu, ID_PCB_USER_GRID_SETUP,
                            _( "User Grid Size" ),
                            _( "Adjust user grid" ) );
        item->SetBitmap( grid_xpm );
        item->SetBitmap( grid_xpm );
        sizes_menu->Append( item );
        sizes_menu->Append( item );


@@ -58,8 +51,8 @@ wxMenuItem * item;
        // Contents
        // Contents
        item = new wxMenuItem( helpMenu,
        item = new wxMenuItem( helpMenu,
                               ID_GENERAL_HELP,
                               ID_GENERAL_HELP,
                                      _("&Contents"), // Menu entry name
                               _( "&Contents" ),
                                      _("Open the pcbnew manual")); // Statusbar message
                               _( "Open the pcbnew manual" ) );
        item->SetBitmap( help_xpm );
        item->SetBitmap( help_xpm );
        helpMenu->Append( item );
        helpMenu->Append( item );


@@ -67,8 +60,8 @@ wxMenuItem * item;
        // About pcbnew
        // About pcbnew
        item = new wxMenuItem( helpMenu,
        item = new wxMenuItem( helpMenu,
                               ID_KICAD_ABOUT,
                               ID_KICAD_ABOUT,
                                      _("&About pcbnew"), // Menu entry name
                               _( "&About pcbnew" ),
                                      _("About pcbnew PCB designer")); // Statusbar message
                               _( "About pcbnew PCB designer" ) );
        item->SetBitmap( info_xpm );
        item->SetBitmap( info_xpm );
        helpMenu->Append( item );
        helpMenu->Append( item );


@@ -76,7 +69,10 @@ wxMenuItem * item;
        // Menu Display 3D: //
        // Menu Display 3D: //
        //////////////////////
        //////////////////////
        wxMenu* Display3DMenu = new wxMenu;
        wxMenu* Display3DMenu = new wxMenu;
		item = new wxMenuItem(Display3DMenu , ID_MENU_PCB_SHOW_3D_FRAME, _("3D Display"), _("Show board in 3D viewer"));
        item = new wxMenuItem( Display3DMenu,
                               ID_MENU_PCB_SHOW_3D_FRAME,
                               _( "3D Display" ),
                               _( "Show board in 3D viewer" ) );
        item->SetBitmap( show_3d_xpm );
        item->SetBitmap( show_3d_xpm );
        Display3DMenu->Append( item );
        Display3DMenu->Append( item );


@@ -88,5 +84,3 @@ wxMenuItem * item;
        SetMenuBar( menuBar );
        SetMenuBar( menuBar );
    }
    }
}
}

+18 −24
Original line number Original line Diff line number Diff line
/******************************************************************/
/*****************************************/
/* menubarpcb.cpp - creation du menu general de l'editeur de board*/
/* menubarpcb.cpp - PCB editor menu bar. */
/******************************************************************/
/*****************************************/
#include "fctsys.h"
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "common.h"
@@ -11,12 +11,8 @@
#include "hotkeys.h"
#include "hotkeys.h"
#include "pcbnew_id.h"
#include "pcbnew_id.h"


/***********************************************/
void WinEDA_PcbFrame::ReCreateMenuBar()
/***********************************************/


/* Cree ou reinitialise le menu du haut d'ecran
void WinEDA_PcbFrame::ReCreateMenuBar()
 */
{
{
    wxMenuItem* item;
    wxMenuItem* item;
    wxMenuBar*  menuBar = GetMenuBar();
    wxMenuBar*  menuBar = GetMenuBar();
@@ -62,7 +58,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    // Add save menu
    // Add save menu
    filesMenu->AppendSeparator();
    filesMenu->AppendSeparator();
    item = new wxMenuItem( filesMenu, ID_SAVE_BOARD,
    item = new wxMenuItem( filesMenu, ID_SAVE_BOARD,
                           _( "&Save Board\tCtrl-S" ), _( "Save current board" ) );
                           _( "&Save Board\tCtrl-S" ),
                           _( "Save current board" ) );
    item->SetBitmap( save_xpm );
    item->SetBitmap( save_xpm );
    filesMenu->Append( item );
    filesMenu->Append( item );


@@ -125,7 +122,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( import_xpm );    // @todo need better bitmap
    item->SetBitmap( import_xpm );    // @todo need better bitmap
    submenuImport->Append( item );
    submenuImport->Append( item );


    /* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in specctra_import.cpp
    /* would be implemented in WinEDA_PcbFrame::ImportSpecctraDesign() in
     * specctra_import.cpp
     *  item = new wxMenuItem(submenuImport, ID_GEN_IMPORT_SPECCTRA_DESIGN,
     *  item = new wxMenuItem(submenuImport, ID_GEN_IMPORT_SPECCTRA_DESIGN,
     *  _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
     *  _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
     *  item->SetBitmap(export_xpm);    // @todo need better bitmap
     *  item->SetBitmap(export_xpm);    // @todo need better bitmap
@@ -167,7 +165,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );
    wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );


    ///////////////////////////////////
    ///////////////////////////////////
    // Preferences an configuration //
    // Preferences and configuration //
    ///////////////////////////////////
    ///////////////////////////////////
    wxMenu* configmenu = new wxMenu;
    wxMenu* configmenu = new wxMenu;
    item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ),
    item = new wxMenuItem( configmenu, ID_CONFIG_REQ, _( "&Library" ),
@@ -175,8 +173,9 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( library_xpm );
    item->SetBitmap( library_xpm );
    configmenu->Append( item );
    configmenu->Append( item );


    item = new wxMenuItem( configmenu, ID_COLORS_SETUP, _( "&Colors and Visibility" ),
    item = new wxMenuItem( configmenu, ID_COLORS_SETUP,
                           _( "Select colors and visibilty of layers and some items" ) );
                           _( "&Colors and Visibility" ),
                           _( "Select colors and visibility of layers and some items" ) );
    item->SetBitmap( palette_xpm );
    item->SetBitmap( palette_xpm );
    configmenu->Append( item );
    configmenu->Append( item );


@@ -185,7 +184,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( preference_xpm );
    item->SetBitmap( preference_xpm );
    configmenu->Append( item );
    configmenu->Append( item );


    item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP, _( "&Display" ),
    item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
                           _( "&Display" ),
                           _( "Select how items (pads, tracks texts ... ) are displayed" ) );
                           _( "Select how items (pads, tracks texts ... ) are displayed" ) );
    item->SetBitmap( display_options_xpm );
    item->SetBitmap( display_options_xpm );
    configmenu->Append( item );
    configmenu->Append( item );
@@ -206,13 +206,13 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    configmenu->Append( item );
    configmenu->Append( item );





    ////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////
    // Add access to the Design Rules Dialog and layers setup //
    // Add access to the Design Rules Dialog and layers setup //
    ////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////
    wxMenu* designRulesMenu = new wxMenu;
    wxMenu* designRulesMenu = new wxMenu;
    item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
    item = new wxMenuItem( designRulesMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
                           _( "Design Rules" ), _( "Open the design rules dialog editor" ) );
                           _( "Design Rules" ),
                           _( "Open the design rules dialog editor" ) );
    item->SetBitmap( hammer_xpm );
    item->SetBitmap( hammer_xpm );
    designRulesMenu->Append( item );
    designRulesMenu->Append( item );


@@ -255,9 +255,6 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( save_xpm );
    item->SetBitmap( save_xpm );
    sizes_menu->Append( item );
    sizes_menu->Append( item );


    //////////////////////////////////////////////////////////////////
    // Menu postprocess ( generation fichiers percage, placement... //
    //////////////////////////////////////////////////////////////////
    wxMenu* postprocess_menu = new wxMenu;
    wxMenu* postprocess_menu = new wxMenu;
    item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_POS_MODULES_FILE,
    item = new wxMenuItem( postprocess_menu, ID_PCB_GEN_POS_MODULES_FILE,
                           _( "Generate &Modules Position" ),
                           _( "Generate &Modules Position" ),
@@ -283,9 +280,6 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( tools_xpm );
    item->SetBitmap( tools_xpm );
    postprocess_menu->Append( item );
    postprocess_menu->Append( item );


    //////////////////////////
    // Menu d'outils divers //
    //////////////////////////
    wxMenu* miscellaneous_menu = new wxMenu;
    wxMenu* miscellaneous_menu = new wxMenu;
    item = new wxMenuItem( miscellaneous_menu, ID_PCB_GLOBAL_DELETE,
    item = new wxMenuItem( miscellaneous_menu, ID_PCB_GLOBAL_DELETE,
                           _( "Global &Deletions" ),
                           _( "Global &Deletions" ),
+54 −62
Original line number Original line Diff line number Diff line
/*********************************************/
/********************************************/
/*  Functions to edite targets (class MIRE)  */
/*  Functions to edit targets (class MIRE)  */
/*********************************************/
/********************************************/


#include "fctsys.h"
#include "fctsys.h"
#include "common.h"
#include "common.h"
@@ -15,12 +15,16 @@


/* Routines Locales */
/* Routines Locales */
static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC );
static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC );
static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel,
                                             wxDC*             DC,
                                             bool              erase );


/* Local variables : */
/* Local variables : */
static int     MireDefaultSize = 5000;
static int     MireDefaultSize = 5000;
static MIREPCB s_TargetCopy( NULL );      /* Used to store "old" values of the current item
static MIREPCB s_TargetCopy( NULL );    /* Used to store "old" values of the
                                         *  parameters before edition (used in undo/redo or cancel operations)
                                         * current item parameters before
                                         * edition (used in undo/redo or
                                         * cancel operations)
                                         */
                                         */


/************************************/
/************************************/
@@ -38,11 +42,10 @@ private:
    WinEDA_ValueCtrl* m_MireSizeCtrl;
    WinEDA_ValueCtrl* m_MireSizeCtrl;
    wxRadioBox*       m_MireShape;
    wxRadioBox*       m_MireShape;


public:
public: WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,

                                    MIREPCB*         Mire,
    // Constructor and destructor
                                    wxDC*            DC,
    WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,
                                    const wxPoint&   pos );
                                MIREPCB* Mire, wxDC* DC, const wxPoint& pos );
    ~WinEDA_MirePropertiesFrame() { }
    ~WinEDA_MirePropertiesFrame() { }


private:
private:
@@ -58,20 +61,19 @@ EVT_BUTTON( wxID_CANCEL, WinEDA_MirePropertiesFrame::OnCancelClick )
END_EVENT_TABLE()
END_EVENT_TABLE()




/***************************************************************/
void WinEDA_PcbFrame::InstallMireOptionsFrame( MIREPCB* MirePcb,
void WinEDA_PcbFrame::InstallMireOptionsFrame( MIREPCB* MirePcb,
                                               wxDC* DC, const wxPoint& pos )
                                               wxDC* DC, const wxPoint& pos )
/***************************************************************/
{
{
    WinEDA_MirePropertiesFrame* frame = new WinEDA_MirePropertiesFrame( this,
    WinEDA_MirePropertiesFrame* frame =
                                                                        MirePcb, DC, pos );
        new WinEDA_MirePropertiesFrame( this, MirePcb, DC, pos );


    frame->ShowModal();
    frame->ShowModal();
    frame->Destroy();
    frame->Destroy();
}
}




WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,
WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame(
    WinEDA_PcbFrame* parent,
    MIREPCB* Mire, wxDC* DC,
    MIREPCB* Mire, wxDC* DC,
    const wxPoint& framepos ) :
    const wxPoint& framepos ) :
    wxDialog( parent, -1, _( "Target Properties" ), framepos, wxSize( 270, 210 ),
    wxDialog( parent, -1, _( "Target Properties" ), framepos, wxSize( 270, 210 ),
@@ -93,7 +95,7 @@ WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,
    MainBoxSizer->Add( LeftBoxSizer, 0, wxGROW | wxALL, 5 );
    MainBoxSizer->Add( LeftBoxSizer, 0, wxGROW | wxALL, 5 );
    MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
    MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );


    /* Creation des boutons de commande */
    /* Create of the command buttons. */
    Button = new wxButton( this, wxID_OK, _( "OK" ) );
    Button = new wxButton( this, wxID_OK, _( "OK" ) );
    RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
    RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );


@@ -103,12 +105,14 @@ WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,
    // Size:
    // Size:
    m_MireSizeCtrl = new WinEDA_ValueCtrl( this, _( "Size" ),
    m_MireSizeCtrl = new WinEDA_ValueCtrl( this, _( "Size" ),
                                           m_MirePcb->m_Size,
                                           m_MirePcb->m_Size,
                                           g_UnitMetric, LeftBoxSizer, m_Parent->m_InternalUnits );
                                           g_UnitMetric, LeftBoxSizer,
                                           m_Parent->m_InternalUnits );


    // Width:
    // Width:
    m_MireWidthCtrl = new WinEDA_ValueCtrl( this, _( "Width" ),
    m_MireWidthCtrl = new WinEDA_ValueCtrl( this, _( "Width" ),
                                            m_MirePcb->m_Width,
                                            m_MirePcb->m_Width,
                                            g_UnitMetric, LeftBoxSizer, m_Parent->m_InternalUnits );
                                            g_UnitMetric, LeftBoxSizer,
                                            m_Parent->m_InternalUnits );


    // Shape
    // Shape
    wxString shape_list[2] = { _( "shape +" ), _( "shape X" ) };
    wxString shape_list[2] = { _( "shape +" ), _( "shape X" ) };
@@ -124,44 +128,42 @@ WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,
}
}




/**********************************************************************/
void WinEDA_MirePropertiesFrame::OnCancelClick( wxCommandEvent& WXUNUSED(
void WinEDA_MirePropertiesFrame::OnCancelClick( wxCommandEvent& WXUNUSED (event) )
                                                   event ) )
/**********************************************************************/
{
{
    EndModal( -1 );
    EndModal( -1 );
}
}




/**************************************************************************/
/* Updates the different parameters for the component being edited
void WinEDA_MirePropertiesFrame::OnOkClick( wxCommandEvent& event )
/**************************************************************************/

/* Met a jour les differents parametres pour le composant en cours d'dition
 */
 */
void WinEDA_MirePropertiesFrame::OnOkClick( wxCommandEvent& event )
{
{
    m_MirePcb->Draw( m_Parent->DrawPanel, m_DC, GR_XOR );
    m_MirePcb->Draw( m_Parent->DrawPanel, m_DC, GR_XOR );


    // Save old item in undo list, if is is not curently edited (will be later if so)
    // Save old item in undo list, if is is not currently edited (will be later
    // if so)
    if( m_MirePcb->m_Flags == 0 )
    if( m_MirePcb->m_Flags == 0 )
        m_Parent->SaveCopyInUndoList( m_MirePcb, UR_CHANGED );
        m_Parent->SaveCopyInUndoList( m_MirePcb, UR_CHANGED );


    if( m_MirePcb->m_Flags != 0)          // other edition in progress (MOVE, NEW ..)
    if( m_MirePcb->m_Flags != 0 )           // other edition in progress (MOVE,
        m_MirePcb->m_Flags |= IN_EDIT;    // set flag in edit to force undo/redo/abort proper operation
                                            // NEW ..)
        m_MirePcb->m_Flags |= IN_EDIT;      // set flag in edit to force
                                            // undo/redo/abort proper operation


    m_MirePcb->m_Width = m_MireWidthCtrl->GetValue();
    m_MirePcb->m_Width = m_MireWidthCtrl->GetValue();
    MireDefaultSize    = m_MirePcb->m_Size = m_MireSizeCtrl->GetValue();
    MireDefaultSize    = m_MirePcb->m_Size = m_MireSizeCtrl->GetValue();
    m_MirePcb->m_Shape = m_MireShape->GetSelection() ? 1 : 0;
    m_MirePcb->m_Shape = m_MireShape->GetSelection() ? 1 : 0;


    m_MirePcb->Draw( m_Parent->DrawPanel, m_DC, (m_MirePcb->m_Flags & IS_MOVED) ? GR_XOR : GR_OR );
    m_MirePcb->Draw( m_Parent->DrawPanel, m_DC,
                     ( m_MirePcb->m_Flags & IS_MOVED ) ? GR_XOR : GR_OR );


    m_Parent->GetScreen()->SetModify();
    m_Parent->GetScreen()->SetModify();
    EndModal( 1 );
    EndModal( 1 );
}
}




/**************************************************************/
void WinEDA_PcbFrame::Delete_Mire( MIREPCB* MirePcb, wxDC* DC )
void WinEDA_PcbFrame::Delete_Mire( MIREPCB* MirePcb, wxDC* DC )
/**************************************************************/
{
{
    if( MirePcb == NULL )
    if( MirePcb == NULL )
        return;
        return;
@@ -172,9 +174,7 @@ void WinEDA_PcbFrame::Delete_Mire( MIREPCB* MirePcb, wxDC* DC )
}
}




/**********************************************************/
static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC )
static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC )
/**********************************************************/
{
{
    BASE_SCREEN* screen  = Panel->GetScreen();
    BASE_SCREEN* screen  = Panel->GetScreen();
    MIREPCB*     MirePcb = (MIREPCB*) screen->GetCurItem();
    MIREPCB*     MirePcb = (MIREPCB*) screen->GetCurItem();
@@ -209,12 +209,9 @@ static void AbortMoveAndEditTarget( WinEDA_DrawPanel* Panel, wxDC* DC )
}
}




/*****************************************************/
/* Draw Symbol PCB type MIRE.
MIREPCB* WinEDA_PcbFrame::Create_Mire( wxDC* DC )
/*****************************************************/

/* Routine de creation d'un Draw Symbole Pcb type MIRE
 */
 */
MIREPCB* WinEDA_PcbFrame::Create_Mire( wxDC* DC )
{
{
    MIREPCB* MirePcb = new MIREPCB( GetBoard() );
    MIREPCB* MirePcb = new MIREPCB( GetBoard() );


@@ -232,12 +229,9 @@ MIREPCB* WinEDA_PcbFrame::Create_Mire( wxDC* DC )
}
}




/**********************************************************************/
/* Routine to initialize the displacement of a focal
void WinEDA_PcbFrame::StartMove_Mire( MIREPCB* MirePcb, wxDC* DC )
/**********************************************************************/

/* Routine d'initialisation du deplacement d'une mire
 */
 */
void WinEDA_PcbFrame::StartMove_Mire( MIREPCB* MirePcb, wxDC* DC )
{
{
    if( MirePcb == NULL )
    if( MirePcb == NULL )
        return;
        return;
@@ -250,9 +244,7 @@ void WinEDA_PcbFrame::StartMove_Mire( MIREPCB* MirePcb, wxDC* DC )
}
}




/**************************************************************/
void WinEDA_PcbFrame::Place_Mire( MIREPCB* MirePcb, wxDC* DC )
void WinEDA_PcbFrame::Place_Mire( MIREPCB* MirePcb, wxDC* DC )
/**************************************************************/
{
{
    if( MirePcb == NULL )
    if( MirePcb == NULL )
        return;
        return;
@@ -273,7 +265,9 @@ void WinEDA_PcbFrame::Place_Mire( MIREPCB* MirePcb, wxDC* DC )


    if( MirePcb->m_Flags == IS_MOVED )
    if( MirePcb->m_Flags == IS_MOVED )
    {
    {
        SaveCopyInUndoList( MirePcb, UR_MOVED, MirePcb->m_Pos - s_TargetCopy.m_Pos );
        SaveCopyInUndoList( MirePcb,
                            UR_MOVED,
                            MirePcb->m_Pos - s_TargetCopy.m_Pos );
        MirePcb->m_Flags = 0;
        MirePcb->m_Flags = 0;
        return;
        return;
    }
    }
@@ -288,10 +282,10 @@ void WinEDA_PcbFrame::Place_Mire( MIREPCB* MirePcb, wxDC* DC )
}
}




/******************************************************************************/
/* Redraw the contour of the track while moving the mouse */
static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel,
/*********************************************************************************/
                                             wxDC*             DC,
/* redessin du contour de la piste  lors des deplacements de la souris */
                                             bool              erase )
{
{
    BASE_SCREEN* screen  = panel->GetScreen();
    BASE_SCREEN* screen  = panel->GetScreen();
    MIREPCB*     MirePcb = (MIREPCB*) screen->GetCurItem();
    MIREPCB*     MirePcb = (MIREPCB*) screen->GetCurItem();
@@ -299,12 +293,10 @@ static void ShowTargetShapeWhileMovingMouse( WinEDA_DrawPanel* panel, wxDC* DC,
    if( MirePcb == NULL )
    if( MirePcb == NULL )
        return;
        return;


    /* efface ancienne position */
    if( erase )
    if( erase )
        MirePcb->Draw( panel, DC, GR_XOR );
        MirePcb->Draw( panel, DC, GR_XOR );


    MirePcb->m_Pos = screen->m_Curseur;
    MirePcb->m_Pos = screen->m_Curseur;


    // Reaffichage
    MirePcb->Draw( panel, DC, GR_XOR );
    MirePcb->Draw( panel, DC, GR_XOR );
}
}
Loading