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 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 "common.h"
@@ -13,13 +13,7 @@
#include "pcbnew_id.h"



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

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

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

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

        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 );
        sizes_menu->Append( item );

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

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

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

@@ -76,7 +69,10 @@ wxMenuItem * item;
        // Menu Display 3D: //
        //////////////////////
        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 );
        Display3DMenu->Append( item );

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

+18 −24
Original line number 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 "appl_wxstruct.h"
#include "common.h"
@@ -11,12 +11,8 @@
#include "hotkeys.h"
#include "pcbnew_id.h"

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

/* Cree ou reinitialise le menu du haut d'ecran
 */
void WinEDA_PcbFrame::ReCreateMenuBar()
{
    wxMenuItem* item;
    wxMenuBar*  menuBar = GetMenuBar();
@@ -62,7 +58,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    // Add save menu
    filesMenu->AppendSeparator();
    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 );
    filesMenu->Append( item );

@@ -125,7 +122,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( import_xpm );    // @todo need better bitmap
    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,
     *  _("&Specctra Design"), _("Import a \"Specctra Design\" (*.dsn) file") );
     *  item->SetBitmap(export_xpm);    // @todo need better bitmap
@@ -167,7 +165,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    wxGetApp().m_fileHistory.AddFilesToMenu( filesMenu );

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

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

@@ -185,7 +184,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    item->SetBitmap( preference_xpm );
    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" ) );
    item->SetBitmap( display_options_xpm );
    configmenu->Append( item );
@@ -206,13 +206,13 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
    configmenu->Append( item );



    ////////////////////////////////////////////////////////////
    // Add access to the Design Rules Dialog and layers setup //
    ////////////////////////////////////////////////////////////
    wxMenu* designRulesMenu = new wxMenu;
    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 );
    designRulesMenu->Append( item );

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

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

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

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

/* Routines Locales */
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 : */
static int     MireDefaultSize = 5000;
static MIREPCB s_TargetCopy( NULL );      /* Used to store "old" values of the current item
                                         *  parameters before edition (used in undo/redo or cancel operations)
static MIREPCB s_TargetCopy( NULL );    /* Used to store "old" values of the
                                         * current item parameters before
                                         * edition (used in undo/redo or
                                         * cancel operations)
                                         */

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

public:

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

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


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

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


WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame( WinEDA_PcbFrame* parent,
WinEDA_MirePropertiesFrame::WinEDA_MirePropertiesFrame(
    WinEDA_PcbFrame* parent,
    MIREPCB* Mire, wxDC* DC,
    const wxPoint& framepos ) :
    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( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );

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

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

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

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


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


/**************************************************************************/
void WinEDA_MirePropertiesFrame::OnOkClick( wxCommandEvent& event )
/**************************************************************************/

/* Met a jour les differents parametres pour le composant en cours d'dition
/* Updates the different parameters for the component being edited
 */
void WinEDA_MirePropertiesFrame::OnOkClick( wxCommandEvent& event )
{
    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 )
        m_Parent->SaveCopyInUndoList( m_MirePcb, UR_CHANGED );

    if( m_MirePcb->m_Flags != 0)          // other edition in progress (MOVE, NEW ..)
        m_MirePcb->m_Flags |= IN_EDIT;    // set flag in edit to force undo/redo/abort proper operation
    if( m_MirePcb->m_Flags != 0 )           // other edition in progress (MOVE,
                                            // 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();
    MireDefaultSize    = m_MirePcb->m_Size = m_MireSizeCtrl->GetValue();
    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();
    EndModal( 1 );
}


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


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


/*****************************************************/
MIREPCB* WinEDA_PcbFrame::Create_Mire( wxDC* DC )
/*****************************************************/

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

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


/**********************************************************************/
void WinEDA_PcbFrame::StartMove_Mire( MIREPCB* MirePcb, wxDC* DC )
/**********************************************************************/

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


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

    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;
        return;
    }
@@ -288,10 +282,10 @@ void WinEDA_PcbFrame::Place_Mire( MIREPCB* MirePcb, wxDC* DC )
}


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

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

    MirePcb->m_Pos = screen->m_Curseur;

    // Reaffichage
    MirePcb->Draw( panel, DC, GR_XOR );
}
+72 −90

File changed.

Preview size limit exceeded, changes collapsed.

+53 −48
Original line number Diff line number Diff line
@@ -16,12 +16,10 @@
#include "protos.h"
#include "pcbnew_id.h"

/*************************************************************************/
void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
/*************************************************************************/

/* Handle the left click in footprint editor
 */
void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
    BOARD_ITEM* DrawStruct = GetCurItem();

@@ -48,10 +46,10 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
            default:
            {
                wxString msg;
                msg.Printf(
                    wxT(
                        "WinEDA_ModEditFrame::OnLeftClick err: m_Flags != 0\nStruct @%p, type %d m_Flag %X" ),
                    DrawStruct, DrawStruct->Type(), DrawStruct->m_Flags );
                msg.Printf( wxT( "WinEDA_ModEditFrame::OnLeftClick err: \
m_Flags != 0\nStruct @%p, type %d m_Flag %X" ),
                            DrawStruct, DrawStruct->Type(),
                            DrawStruct->m_Flags );
                DisplayError( this, msg );
                DrawStruct->m_Flags = 0;
                break;
@@ -109,18 +107,22 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
                    Begin_Edge_Module( (EDGE_MODULE*) DrawStruct, DC, 0 ) );
            }
            else
                DisplayError( this, wxT( "ProcessCommand error: DrawStruct/ flags error" ) );
                DisplayError( this,
                              wxT( "ProcessCommand error: DrawStruct flags error" ) );
        }
        break;

    case ID_MODEDIT_DELETE_ITEM_BUTT:
        if( DrawStruct && (DrawStruct->m_Flags != 0) )  // Item in edit, cannot delete it

        // Item in edit, cannot delete it
        if( DrawStruct && (DrawStruct->m_Flags != 0) )
            break;
        DrawStruct = ModeditLocateAndDisplay();
        if( DrawStruct == NULL || (DrawStruct->m_Flags != 0) )
            break;
        if( DrawStruct->Type() != TYPE_MODULE ) //GetBoard()->m_Modules )     // Cannot delete the module itself
        if( DrawStruct->Type() != TYPE_MODULE ) //GetBoard()->m_Modules )
        {
            // Cannot delete the module itself
            SaveCopyInUndoList( GetBoard()->m_Modules, UR_MODEDIT );
            RemoveStruct( DrawStruct );
            DrawStruct = NULL;
@@ -133,11 +135,13 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
        MODULE* module = GetBoard()->m_Modules;
        module->m_Flags = 0;
        SaveCopyInUndoList( module, UR_MODEDIT );
        Place_Ancre( module );      // set the new relatives internal coordinates of items
        Place_Ancre( module );      // set the new relatives internal
                                    // coordinates of items
        GetScreen()->m_Curseur = wxPoint( 0, 0 );
        Recadre_Trace( TRUE );

        // Replace the module in position 0, to recalculate absolutes coordinates of items
        // Replace the module in position 0, to recalculate absolutes
        // coordinates of items
        module->SetPosition( wxPoint( 0, 0 ) );
        SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
        SetCurItem( NULL );
@@ -160,7 +164,8 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )

    default:
        DrawPanel->SetCursor( wxCURSOR_ARROW );
        DisplayError( this, wxT( "WinEDA_ModuleEditFrame::ProcessCommand error" ) );
        DisplayError( this,
                      wxT( "WinEDA_ModuleEditFrame::ProcessCommand error" ) );
        m_ID_current_state = 0;
        break;
    }
@@ -169,28 +174,26 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
}


/*********************************************************************/
bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
                                           wxMenu*        PopMenu )
/*********************************************************************/

/* Handle the right click in the footprint editor:
 * Create the pull up menu
 * After this menu is built, the standart ZOOM menu is added
 * After this menu is built, the standard ZOOM menu is added
 */
bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
                                           wxMenu*        PopMenu )
{
    BOARD_ITEM* DrawStruct = GetCurItem();
    wxString    msg;
    bool        append_set_width = FALSE;
    bool        BlockActive = (GetScreen()->m_BlockLocate.m_Command !=  BLOCK_IDLE);
    bool        BlockActive =
        ( GetScreen()->m_BlockLocate.m_Command !=  BLOCK_IDLE );

    // Simple localisation des elements si possible
    // Simple location of elements where possible.
    if( ( DrawStruct == NULL ) || ( DrawStruct->m_Flags == 0 ) )
    {
        SetCurItem( DrawStruct = ModeditLocateAndDisplay() );
    }

    // Si commande en cours: affichage fin de commande
    // End command in progress.
    if(  m_ID_current_state )
    {
        if( DrawStruct && DrawStruct->m_Flags )
@@ -207,23 +210,28 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
    {
        if( (DrawStruct && DrawStruct->m_Flags) || BlockActive )
        {
            if( BlockActive )  // Put block commnands in list
            if( BlockActive )  // Put block commands in list
            {
                ADD_MENUITEM( PopMenu, ID_POPUP_CANCEL_CURRENT_COMMAND,
                              _( "Cancel Block" ), cancel_xpm );
                ADD_MENUITEM( PopMenu, ID_POPUP_ZOOM_BLOCK,
                              _( "Zoom Block (drag middle mouse)" ), zoom_selected_xpm );
                              _( "Zoom Block (drag middle mouse)" ),
                              zoom_selected_xpm );
                PopMenu->AppendSeparator();
                ADD_MENUITEM( PopMenu, ID_POPUP_PLACE_BLOCK,
                              _( "Place Block" ), apply_xpm );
                ADD_MENUITEM( PopMenu, ID_POPUP_COPY_BLOCK,
                              _( "Copy Block (shift + drag mouse)" ), copyblock_xpm );
                              _( "Copy Block (shift + drag mouse)" ),
                              copyblock_xpm );
                ADD_MENUITEM( PopMenu, ID_POPUP_MIRROR_X_BLOCK,
                              _( "Mirror Block (alt + drag mouse)" ), mirror_H_xpm );
                              _( "Mirror Block (alt + drag mouse)" ),
                              mirror_H_xpm );
                ADD_MENUITEM( PopMenu, ID_POPUP_ROTATE_BLOCK,
                              _( "Rotate Block (ctrl + drag mouse)" ), rotate_pos_xpm );
                              _( "Rotate Block (ctrl + drag mouse)" ),
                              rotate_pos_xpm );
                ADD_MENUITEM( PopMenu, ID_POPUP_DELETE_BLOCK,
                              _( "Delete Block (shift+ctrl + drag mouse)" ), delete_xpm );
                              _( "Delete Block (shift+ctrl + drag mouse)" ),
                              delete_xpm );
            }
            else
            {
@@ -262,7 +270,8 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
            ADD_MENUITEM( PopMenu, ID_POPUP_PCB_MOVE_PAD_REQUEST,
                          _( "Move Pad" ), move_pad_xpm );
        }
        ADD_MENUITEM( PopMenu, ID_POPUP_PCB_EDIT_PAD, _( "Edit Pad" ), options_pad_xpm );
        ADD_MENUITEM( PopMenu, ID_POPUP_PCB_EDIT_PAD, _( "Edit Pad" ),
                      options_pad_xpm );
        ADD_MENUITEM( PopMenu, ID_POPUP_PCB_IMPORT_PAD_SETTINGS,
                      _( "New Pad Settings" ), options_new_pad_xpm );
        ADD_MENUITEM( PopMenu, ID_POPUP_PCB_EXPORT_PAD_SETTINGS,
@@ -308,7 +317,8 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
                          _( "Place edge" ), apply_xpm );
        wxMenu* edit_mnu = new wxMenu;
        ADD_MENUITEM_WITH_SUBMENU( PopMenu, edit_mnu,
                                   ID_POPUP_PCB_EDIT_EDGE, _( "Edit" ), edit_xpm );
                                   ID_POPUP_PCB_EDIT_EDGE, _(
                                       "Edit" ), edit_xpm );
        ADD_MENUITEM( edit_mnu, ID_POPUP_PCB_EDIT_WIDTH_CURRENT_EDGE,
                      _( "Edit Width (Current)" ), width_segment_xpm );
        ADD_MENUITEM( edit_mnu, ID_POPUP_PCB_EDIT_WIDTH_ALL_EDGE,
@@ -336,15 +346,13 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
    case TYPE_SCREEN:
    case TYPE_NOT_INIT:
    case TYPE_PCB:
        msg.Printf(
            wxT( "WinEDA_ModuleEditFrame::OnRightClick Error: illegal DrawType %d" ),
        msg.Printf( wxT( "WinEDA_ModuleEditFrame::OnRightClick Error: illegal DrawType %d" ),
            DrawStruct->Type() );
        DisplayError( this, msg );
        break;

    default:
        msg.Printf(
            wxT( "WinEDA_ModuleEditFrame::OnRightClick Error: unknown DrawType %d" ),
        msg.Printf( wxT( "WinEDA_ModuleEditFrame::OnRightClick Error: unknown DrawType %d" ),
            DrawStruct->Type() );
        DisplayError( this, msg );
        break;
@@ -353,7 +361,8 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
    PopMenu->AppendSeparator();

    if( append_set_width
       || ( m_ID_current_state && ( (m_ID_current_state == ID_PCB_ADD_LINE_BUTT)
       || ( m_ID_current_state
           && ( ( m_ID_current_state == ID_PCB_ADD_LINE_BUTT )
               || ( m_ID_current_state == ID_PCB_CIRCLE_BUTT )
               || ( m_ID_current_state == ID_PCB_ARC_BUTT ) ) ) )
    {
@@ -366,13 +375,10 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
}


/****************************************************************************/
void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
/****************************************************************************/

/*  Handle the double click in the footprin editor:
/*  Handle the double click in the footprint editor:
 *  If the double clicked item is editable: call the corresponding editor.
 */
void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
{
    BOARD_ITEM* DrawStruct = GetCurItem();
    wxPoint     pos = GetPosition();
@@ -397,8 +403,7 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
        switch( DrawStruct->Type() )
        {
        case TYPE_PAD:
            InstallPadOptionsFrame(
                (D_PAD*) DrawStruct, &dc, pos );
            InstallPadOptionsFrame( (D_PAD*) DrawStruct, &dc, pos );
            DrawPanel->MouseToCursorSchema();
            break;

Loading