minor changes about hotkeys in onrightclick.cpp
This commit is contained in:
parent
0a2ed094e0
commit
63cf8c53f2
Binary file not shown.
1359
internat/fr/kicad.po
1359
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
|
@ -1129,7 +1129,7 @@ void MODULE::Display_Infos( WinEDA_DrawFrame* frame )
|
||||||
pos += 4;
|
pos += 4;
|
||||||
msg = wxT( ".." );
|
msg = wxT( ".." );
|
||||||
if( IsLocked() )
|
if( IsLocked() )
|
||||||
msg[0] = 'F';
|
msg[0] = 'L';
|
||||||
if( m_ModuleStatus & MODULE_is_PLACED )
|
if( m_ModuleStatus & MODULE_is_PLACED )
|
||||||
msg[1] = 'P';
|
msg[1] = 'P';
|
||||||
Affiche_1_Parametre( frame, pos, _( "Stat" ), msg, MAGENTA );
|
Affiche_1_Parametre( frame, pos, _( "Stat" ), msg, MAGENTA );
|
||||||
|
|
|
@ -10,10 +10,8 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "pcbnew.h"
|
#include "pcbnew.h"
|
||||||
#include "autorout.h"
|
#include "autorout.h"
|
||||||
|
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "hotkeys.h"
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
/* Bitmaps */
|
/* Bitmaps */
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
@ -117,6 +115,7 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
bool locate_track = FALSE;
|
bool locate_track = FALSE;
|
||||||
bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE);
|
bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE);
|
||||||
|
|
||||||
wxClientDC dc( DrawPanel );
|
wxClientDC dc( DrawPanel );
|
||||||
|
|
||||||
BOARD_ITEM* item = GetCurItem();
|
BOARD_ITEM* item = GetCurItem();
|
||||||
|
@ -165,8 +164,10 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
if( !item || !item->m_Flags )
|
if( !item || !item->m_Flags )
|
||||||
{
|
{
|
||||||
item = PcbGeneralLocateAndDisplay();
|
item = PcbGeneralLocateAndDisplay();
|
||||||
|
SetCurItem( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item = GetCurItem();
|
||||||
if( item )
|
if( item )
|
||||||
flags = item->m_Flags;
|
flags = item->m_Flags;
|
||||||
else
|
else
|
||||||
|
@ -185,12 +186,14 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
|
|
||||||
if( !((MODULE*)item)->IsLocked() )
|
if( !((MODULE*)item)->IsLocked() )
|
||||||
{
|
{
|
||||||
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE, _( "Lock Module" ),
|
msg = AddHotkeyName( _( "Lock Module" ), s_Board_Editor_Hokeys_Descr, HK_LOCK_UNLOCK_FOOTPRINT );
|
||||||
|
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE, msg,
|
||||||
Locked_xpm );
|
Locked_xpm );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FREE_MODULE, _( "Unlock Module" ),
|
msg = AddHotkeyName( _( "Unlock Module" ), s_Board_Editor_Hokeys_Descr, HK_LOCK_UNLOCK_FOOTPRINT );
|
||||||
|
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FREE_MODULE, msg,
|
||||||
Unlocked_xpm );
|
Unlocked_xpm );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,8 +310,10 @@ void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
||||||
|
|
||||||
if( !flags )
|
if( !flags )
|
||||||
{
|
{
|
||||||
|
msg = AddHotkeyName( _( "Get and Move Footprint" ),
|
||||||
|
s_Board_Editor_Hokeys_Descr, HK_GET_AND_MOVE_FOOTPRINT );
|
||||||
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST,
|
ADD_MENUITEM( aPopMenu, ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST,
|
||||||
_( "Get and Move Footprint" ), Move_Module_xpm );
|
msg, Move_Module_xpm );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Traitement des fonctions specifiques */
|
/* Traitement des fonctions specifiques */
|
||||||
|
@ -454,15 +459,15 @@ void WinEDA_PcbFrame::createPopUpBlockMenu( wxMenu* menu )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************/
|
/******************************************************************************/
|
||||||
void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
|
void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
|
||||||
/*******************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
/* Create command lines for a popup menu, for track editing
|
/* Create command lines for a popup menu, for track editing
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxPoint cursorPosition = GetScreen()->m_Curseur;
|
wxPoint cursorPosition = GetScreen()->m_Curseur;
|
||||||
|
wxString msg;
|
||||||
int flags = Track->m_Flags;
|
int flags = Track->m_Flags;
|
||||||
|
|
||||||
if( flags == 0 )
|
if( flags == 0 )
|
||||||
|
@ -471,6 +476,7 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
|
||||||
{
|
{
|
||||||
ADD_MENUITEM( PopMenu, ID_POPUP_PCB_MOVE_TRACK_NODE, _( "Drag Via" ), move_xpm );
|
ADD_MENUITEM( PopMenu, ID_POPUP_PCB_MOVE_TRACK_NODE, _( "Drag Via" ), move_xpm );
|
||||||
wxMenu* via_mnu = new wxMenu();
|
wxMenu* via_mnu = new wxMenu();
|
||||||
|
|
||||||
ADD_MENUITEM_WITH_SUBMENU( PopMenu, via_mnu,
|
ADD_MENUITEM_WITH_SUBMENU( PopMenu, via_mnu,
|
||||||
ID_POPUP_PCB_VIA_EDITING, _( "Edit Via" ), edit_xpm );
|
ID_POPUP_PCB_VIA_EDITING, _( "Edit Via" ), edit_xpm );
|
||||||
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_TO_DEFAULT,
|
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_TO_DEFAULT,
|
||||||
|
@ -523,8 +529,12 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
|
||||||
else // Edition in progress
|
else // Edition in progress
|
||||||
{
|
{
|
||||||
if( flags & IS_NEW )
|
if( flags & IS_NEW )
|
||||||
ADD_MENUITEM( PopMenu, ID_POPUP_PCB_END_TRACK, _( "End Track (end)" ), apply_xpm );
|
{
|
||||||
PopMenu->Append( ID_POPUP_PCB_PLACE_VIA, _( "Place Via (V)" ) );
|
msg = AddHotkeyName( _( "End Track" ), s_Board_Editor_Hokeys_Descr, HK_END_TRACK );
|
||||||
|
ADD_MENUITEM( PopMenu, ID_POPUP_PCB_END_TRACK, msg, apply_xpm );
|
||||||
|
}
|
||||||
|
msg = AddHotkeyName( _( "Place Via" ), s_Board_Editor_Hokeys_Descr, HK_ADD_VIA );
|
||||||
|
PopMenu->Append( ID_POPUP_PCB_PLACE_VIA, msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
// track Width control :
|
// track Width control :
|
||||||
|
@ -551,12 +561,14 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
|
||||||
track_mnu = new wxMenu;
|
track_mnu = new wxMenu;
|
||||||
ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu,
|
ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu,
|
||||||
ID_POPUP_PCB_DELETE_TRACK_MNU, _( "Delete" ), delete_xpm );
|
ID_POPUP_PCB_DELETE_TRACK_MNU, _( "Delete" ), delete_xpm );
|
||||||
|
msg = AddHotkeyName( _( "Delete Segment" ), s_Board_Editor_Hokeys_Descr, HK_BACK_SPACE );
|
||||||
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_DELETE_TRACKSEG,
|
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_DELETE_TRACKSEG,
|
||||||
_( "Delete Segment (backspace)" ), Delete_Line_xpm );
|
msg, Delete_Line_xpm );
|
||||||
if( !flags )
|
if( !flags )
|
||||||
{
|
{
|
||||||
|
msg = AddHotkeyName( _( "Delete Track" ), s_Board_Editor_Hokeys_Descr, HK_DELETE );
|
||||||
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_DELETE_TRACK,
|
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_DELETE_TRACK,
|
||||||
_( "Delete Track (delete)" ), Delete_Track_xpm );
|
msg, Delete_Track_xpm );
|
||||||
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_DELETE_TRACKNET,
|
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_DELETE_TRACKNET,
|
||||||
_( "Delete Net" ), Delete_Net_xpm );
|
_( "Delete Net" ), Delete_Net_xpm );
|
||||||
}
|
}
|
||||||
|
@ -593,25 +605,29 @@ void WinEDA_PcbFrame::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* men
|
||||||
{
|
{
|
||||||
wxMenu* sub_menu_footprint;
|
wxMenu* sub_menu_footprint;
|
||||||
int flags = aModule->m_Flags;
|
int flags = aModule->m_Flags;
|
||||||
|
wxString msg;
|
||||||
wxString msg = aModule->MenuText( m_Pcb );
|
|
||||||
|
|
||||||
sub_menu_footprint = new wxMenu;
|
sub_menu_footprint = new wxMenu;
|
||||||
|
|
||||||
|
msg = aModule->MenuText( m_Pcb );
|
||||||
ADD_MENUITEM_WITH_SUBMENU( menu, sub_menu_footprint, -1, msg, module_xpm );
|
ADD_MENUITEM_WITH_SUBMENU( menu, sub_menu_footprint, -1, msg, module_xpm );
|
||||||
if( !flags )
|
if( !flags )
|
||||||
{
|
{
|
||||||
|
msg = AddHotkeyName( _( "Move" ), s_Board_Editor_Hokeys_Descr, HK_MOVE_FOOTPRINT );
|
||||||
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_MOVE_MODULE_REQUEST,
|
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_MOVE_MODULE_REQUEST,
|
||||||
_( "Move (M)" ), Move_Module_xpm );
|
msg, Move_Module_xpm );
|
||||||
|
msg = AddHotkeyName( _( "Drag" ), s_Board_Editor_Hokeys_Descr, HK_DRAG_FOOTPRINT );
|
||||||
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_DRAG_MODULE_REQUEST,
|
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_DRAG_MODULE_REQUEST,
|
||||||
_( "Drag (G)" ), Drag_Module_xpm );
|
msg, Drag_Module_xpm );
|
||||||
}
|
}
|
||||||
|
msg = AddHotkeyName( _( "Rotate +" ), s_Board_Editor_Hokeys_Descr, HK_ROTATE_FOOTPRINT );
|
||||||
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE,
|
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE,
|
||||||
_( "Rotate + (R)" ), rotate_module_pos_xpm );
|
msg, rotate_module_pos_xpm );
|
||||||
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE,
|
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE,
|
||||||
_( "Rotate -" ), rotate_module_neg_xpm );
|
_( "Rotate -" ), rotate_module_neg_xpm );
|
||||||
|
msg = AddHotkeyName( _( "Flip" ), s_Board_Editor_Hokeys_Descr, HK_FLIP_FOOTPRINT );
|
||||||
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_CHANGE_SIDE_MODULE,
|
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_CHANGE_SIDE_MODULE,
|
||||||
_( "Flip (S)" ), invert_module_xpm );
|
msg, invert_module_xpm );
|
||||||
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_EDIT_MODULE,
|
ADD_MENUITEM( sub_menu_footprint, ID_POPUP_PCB_EDIT_MODULE,
|
||||||
_( "Edit" ), Edit_Module_xpm );
|
_( "Edit" ), Edit_Module_xpm );
|
||||||
|
|
||||||
|
@ -722,9 +738,9 @@ void WinEDA_PcbFrame::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*****************************************************************************/
|
||||||
void WinEDA_PcbFrame::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu )
|
void WinEDA_PcbFrame::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu )
|
||||||
/*************************************************************/
|
/*****************************************************************************/
|
||||||
/* Create pop menu for pcb texts */
|
/* Create pop menu for pcb texts */
|
||||||
{
|
{
|
||||||
wxMenu* sub_menu_Text;
|
wxMenu* sub_menu_Text;
|
||||||
|
|
Loading…
Reference in New Issue