Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
2c0377b0
Commit
2c0377b0
authored
Jun 26, 2007
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more better hotkey.cpp and small changes in locate footprint
parent
cd4ed0e7
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
553 additions
and
510 deletions
+553
-510
build_version.h
include/build_version.h
+1
-1
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+497
-491
hotkeys.cpp
pcbnew/hotkeys.cpp
+33
-7
locate.cpp
pcbnew/locate.cpp
+12
-3
onrightclick.cpp
pcbnew/onrightclick.cpp
+6
-6
drawpanel.cpp
share/drawpanel.cpp
+4
-2
No files found.
include/build_version.h
View file @
2c0377b0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
COMMON_GLOBL
wxString
g_BuildVersion
COMMON_GLOBL
wxString
g_BuildVersion
#ifdef EDA_BASE
#ifdef EDA_BASE
(
wxT
(
"(2007-06-2
5
)"
))
(
wxT
(
"(2007-06-2
6
)"
))
#endif
#endif
;
;
...
...
internat/fr/kicad.mo
View file @
2c0377b0
No preview for this file type
internat/fr/kicad.po
View file @
2c0377b0
This diff is collapsed.
Click to expand it.
pcbnew/hotkeys.cpp
View file @
2c0377b0
...
@@ -38,9 +38,12 @@ sous le courseur souris
...
@@ -38,9 +38,12 @@ sous le courseur souris
if
(
hotkey
==
0
)
return
;
if
(
hotkey
==
0
)
return
;
// code Ctrl A = 1, Ctr B = 2 ..., remapped, (more easy to understand in switch)
if
(
hotkey
&
GR_KB_CTRL
)
hotkey
+=
'A'
-
1
;
MODULE
*
module
=
NULL
;
MODULE
*
module
=
NULL
;
hotkey
=
toupper
(
hotkey
);
if
(
hotkey
<=
0xFF
)
hotkey
=
toupper
(
hotkey
);
switch
(
hotkey
)
switch
(
hotkey
)
{
{
case
WXK_DELETE
:
case
WXK_DELETE
:
...
@@ -49,7 +52,6 @@ sous le courseur souris
...
@@ -49,7 +52,6 @@ sous le courseur souris
break
;
break
;
case
WXK_BACK
:
case
WXK_BACK
:
{
if
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
if
(
m_ID_current_state
==
ID_TRACK_BUTT
&&
GetScreen
()
->
m_Active_Layer
<=
CMP_N
)
GetScreen
()
->
m_Active_Layer
<=
CMP_N
)
{
{
...
@@ -74,13 +76,38 @@ sous le courseur souris
...
@@ -74,13 +76,38 @@ sous le courseur souris
}
}
}
}
break
;
break
;
}
case
WXK_END
:
case
WXK_END
:
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
End_Route
(
(
TRACK
*
)
(
GetScreen
()
->
m_CurrentItem
),
DC
);
End_Route
(
(
TRACK
*
)
(
GetScreen
()
->
m_CurrentItem
),
DC
);
break
;
break
;
case
'F'
+
GR_KB_CTRL
:
{
wxCommandEvent
evt
;
evt
.
SetId
(
ID_FIND_ITEMS
);
Process_Special_Functions
(
evt
);
}
break
;
case
(
int
(
'O'
)
+
GR_KB_CTRL
)
:
{
//try not to duplicate save, load code etc.
wxCommandEvent
evt
;
evt
.
SetId
(
ID_LOAD_FILE
);
Files_io
(
evt
);
}
break
;
case
'S'
+
GR_KB_CTRL
:
{
//try not to duplicate save, load code etc.
wxCommandEvent
evt
;
evt
.
SetId
(
ID_SAVE_BOARD
);
Files_io
(
evt
);
}
break
;
case
'V'
:
// Switch to alternate layer and Place a via if a track is in progress
case
'V'
:
// Switch to alternate layer and Place a via if a track is in progress
if
(
m_ID_current_state
!=
ID_TRACK_BUTT
)
return
;
if
(
m_ID_current_state
!=
ID_TRACK_BUTT
)
return
;
if
(
ItemFree
)
if
(
ItemFree
)
...
@@ -101,7 +128,7 @@ sous le courseur souris
...
@@ -101,7 +128,7 @@ sous le courseur souris
case
'L'
:
// toggle module "MODULE_is_LOCKED" status:
case
'L'
:
// toggle module "MODULE_is_LOCKED" status:
// get any module, locked or not locked and toggle its locked status
// get any module, locked or not locked and toggle its locked status
if
(
ItemFree
)
if
(
ItemFree
)
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_O
N_GRILLE
|
MATCH_LAYER
);
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_O
FF_GRILLE
|
VISIBLE_ONLY
);
else
if
(
GetScreen
()
->
m_CurrentItem
->
m_StructType
==
TYPEMODULE
)
else
if
(
GetScreen
()
->
m_CurrentItem
->
m_StructType
==
TYPEMODULE
)
module
=
(
MODULE
*
)
GetScreen
()
->
m_CurrentItem
;
module
=
(
MODULE
*
)
GetScreen
()
->
m_CurrentItem
;
if
(
module
)
if
(
module
)
...
@@ -120,14 +147,13 @@ sous le courseur souris
...
@@ -120,14 +147,13 @@ sous le courseur souris
if
(
ItemFree
)
if
(
ItemFree
)
{
{
module
=
Locate_Prefered_Module
(
m_Pcb
,
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_O
N_GRILLE
|
IGNORE_LOCKED
|
MATCH_LAYER
);
CURSEUR_O
FF_GRILLE
|
IGNORE_LOCKED
|
VISIBLE_ONLY
/*MATCH_LAYER */
);
if
(
module
==
NULL
)
// no footprint found
if
(
module
==
NULL
)
// no footprint found
{
{
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_O
N
_GRILLE
);
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_O
FF
_GRILLE
);
if
(
module
)
// a footprint is found, but locked or on an other layer
if
(
module
)
// a footprint is found, but locked or on an other layer
{
{
if
(
module
->
IsLocked
()
)
DisplayInfo
(
this
,
_
(
"Footprint found, but locked"
)
);
if
(
module
->
IsLocked
()
)
DisplayInfo
(
this
,
_
(
"Footprint found, but locked"
)
);
else
DisplayInfo
(
this
,
_
(
"Footprint found, but not on this layer"
)
);
module
=
NULL
;
module
=
NULL
;
}
}
}
}
...
...
pcbnew/locate.cpp
View file @
2c0377b0
...
@@ -163,7 +163,7 @@ EDA_BaseStruct * item;
...
@@ -163,7 +163,7 @@ EDA_BaseStruct * item;
{
{
TEXTE_MODULE
*
pt_texte
;
TEXTE_MODULE
*
pt_texte
;
if
(
module
->
m_Layer
!=
LayerSearch
)
continue
;
if
(
module
->
m_Layer
!=
LayerSearch
)
continue
;
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
);
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
|
VISIBLE_ONLY
);
if
(
pt_texte
!=
NULL
)
if
(
pt_texte
!=
NULL
)
{
{
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
...
@@ -176,7 +176,7 @@ EDA_BaseStruct * item;
...
@@ -176,7 +176,7 @@ EDA_BaseStruct * item;
module
=
NULL
;
module
=
NULL
;
{
{
TEXTE_MODULE
*
pt_texte
;
TEXTE_MODULE
*
pt_texte
;
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
);
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
|
VISIBLE_ONLY
);
if
(
pt_texte
!=
NULL
)
if
(
pt_texte
!=
NULL
)
{
{
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
...
@@ -185,7 +185,7 @@ EDA_BaseStruct * item;
...
@@ -185,7 +185,7 @@ EDA_BaseStruct * item;
}
}
/* Search for a footprint */
/* Search for a footprint */
if
(
(
module
=
Locate_Prefered_Module
(
m_Pcb
,
typeloc
))
!=
NULL
)
if
(
(
module
=
Locate_Prefered_Module
(
m_Pcb
,
typeloc
|
VISIBLE_ONLY
))
!=
NULL
)
{
{
module
->
Display_Infos
(
this
);
module
->
Display_Infos
(
this
);
return
module
;
return
module
;
...
@@ -738,6 +738,8 @@ TEXTE_MODULE * LocateTexteModule(BOARD * Pcb, MODULE ** PtModule, int typeloc)
...
@@ -738,6 +738,8 @@ TEXTE_MODULE * LocateTexteModule(BOARD * Pcb, MODULE ** PtModule, int typeloc)
retourne
retourne
- pointeur sur le texte localise ( ou NULL )
- pointeur sur le texte localise ( ou NULL )
- si Ptmodule != NULL: pointeur sur module module ( non modifie sinon )
- si Ptmodule != NULL: pointeur sur module module ( non modifie sinon )
if typeloc bas the flag VISIBLE_ONLY set, only footprints which are "visible" are considered
*/
*/
{
{
EDA_BaseStruct
*
PtStruct
;
EDA_BaseStruct
*
PtStruct
;
...
@@ -755,6 +757,13 @@ wxPoint ref_pos;
...
@@ -755,6 +757,13 @@ wxPoint ref_pos;
for
(
;
module
!=
NULL
;
module
=
(
MODULE
*
)
module
->
Pnext
)
for
(
;
module
!=
NULL
;
module
=
(
MODULE
*
)
module
->
Pnext
)
{
{
if
(
(
typeloc
&
VISIBLE_ONLY
)
)
{
int
layer
=
module
->
m_Layer
;
if
(
layer
==
ADHESIVE_N_CU
||
layer
==
SILKSCREEN_N_CU
)
layer
=
CUIVRE_N
;
else
if
(
layer
==
ADHESIVE_N_CMP
||
layer
==
SILKSCREEN_N_CMP
)
layer
=
CMP_N
;
if
(
!
IsModuleLayerVisible
(
layer
)
)
continue
;
}
pt_txt_mod
=
module
->
m_Reference
;
pt_txt_mod
=
module
->
m_Reference
;
/* la souris est-elle dans le rectangle autour du texte*/
/* la souris est-elle dans le rectangle autour du texte*/
if
(
pt_txt_mod
->
Locate
(
ref_pos
)
)
if
(
pt_txt_mod
->
Locate
(
ref_pos
)
)
...
...
pcbnew/onrightclick.cpp
View file @
2c0377b0
...
@@ -117,9 +117,9 @@ double value;
...
@@ -117,9 +117,9 @@ double value;
/****************************************************************************/
/****************************************************************************/
void
WinEDA_PcbFrame
::
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
void
WinEDA_PcbFrame
::
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
/****************************************************************************/
/****************************************************************************/
/*
Prepare le menu PopUp affich� par un click sur le bouton droit
/*
Create the PopUp menu (click on right mouse button)
de la souris.
de la souris.
Ce menu est ensuite compl�t� par la liste des commandes de ZOOM
The ZOOM menu is added to this menu
*/
*/
{
{
EDA_BaseStruct
*
DrawStruct
=
m_CurrentScreen
->
m_CurrentItem
;
EDA_BaseStruct
*
DrawStruct
=
m_CurrentScreen
->
m_CurrentItem
;
...
@@ -137,14 +137,14 @@ wxClientDC dc(DrawPanel);
...
@@ -137,14 +137,14 @@ wxClientDC dc(DrawPanel);
{
{
if
(
m_HTOOL_current_state
==
ID_TOOLBARH_PCB_AUTOPLACE
)
if
(
m_HTOOL_current_state
==
ID_TOOLBARH_PCB_AUTOPLACE
)
{
{
DrawStruct
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_OFF_GRILLE
);
DrawStruct
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_OFF_GRILLE
|
VISIBLE_ONLY
);
if
(
DrawStruct
)
((
MODULE
*
)
DrawStruct
)
->
Display_Infos
(
this
);
if
(
DrawStruct
)
((
MODULE
*
)
DrawStruct
)
->
Display_Infos
(
this
);
else
DrawStruct
=
PcbGeneralLocateAndDisplay
();
else
DrawStruct
=
PcbGeneralLocateAndDisplay
();
}
}
else
DrawStruct
=
PcbGeneralLocateAndDisplay
();
else
DrawStruct
=
PcbGeneralLocateAndDisplay
();
}
}
//
Si commande en cours: affichage fin de commande
//
If command in progress: Put the Cancel command (if needed) and End command
if
(
m_ID_current_state
)
if
(
m_ID_current_state
)
{
{
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
...
@@ -187,7 +187,7 @@ wxClientDC dc(DrawPanel);
...
@@ -187,7 +187,7 @@ wxClientDC dc(DrawPanel);
if
(
!
flags
)
if
(
!
flags
)
{
{
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST
,
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST
,
_
(
"
Footprint Get and Move (F)
"
),
Move_Module_xpm
);
_
(
"
Get and Move Footprint
"
),
Move_Module_xpm
);
}
}
if
(
DrawStruct
)
if
(
DrawStruct
)
{
{
...
@@ -200,7 +200,7 @@ wxClientDC dc(DrawPanel);
...
@@ -200,7 +200,7 @@ wxClientDC dc(DrawPanel);
if
(
m_HTOOL_current_state
==
ID_TOOLBARH_PCB_AUTOPLACE
)
if
(
m_HTOOL_current_state
==
ID_TOOLBARH_PCB_AUTOPLACE
)
{
{
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE
,
_
(
"
Fix
Module"
),
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE
,
_
(
"
Lock
Module"
),
Locked_xpm
);
Locked_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE
,
_
(
"Free Module"
),
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE
,
_
(
"Free Module"
),
Unlocked_xpm
);
Unlocked_xpm
);
...
...
share/drawpanel.cpp
View file @
2c0377b0
...
@@ -900,12 +900,10 @@ bool escape = FALSE;
...
@@ -900,12 +900,10 @@ bool escape = FALSE;
break
;
break
;
}
}
if
(
event
.
ControlDown
()
)
localkey
|=
GR_KB_CTRL
;
if
(
event
.
ControlDown
()
)
localkey
|=
GR_KB_CTRL
;
if
(
event
.
AltDown
()
)
localkey
|=
GR_KB_ALT
;
if
(
event
.
AltDown
()
)
localkey
|=
GR_KB_ALT
;
if
(
event
.
ShiftDown
()
&&
(
key
>
256
)
)
localkey
|=
GR_KB_SHIFT
;
if
(
event
.
ShiftDown
()
&&
(
key
>
256
)
)
localkey
|=
GR_KB_SHIFT
;
wxClientDC
DC
(
this
);
wxClientDC
DC
(
this
);
BASE_SCREEN
*
Screen
=
GetScreen
();
BASE_SCREEN
*
Screen
=
GetScreen
();
...
@@ -925,6 +923,10 @@ BASE_SCREEN * Screen = GetScreen();
...
@@ -925,6 +923,10 @@ BASE_SCREEN * Screen = GetScreen();
}
}
m_Parent
->
GeneralControle
(
&
DC
,
Screen
->
m_MousePositionInPixels
);
m_Parent
->
GeneralControle
(
&
DC
,
Screen
->
m_MousePositionInPixels
);
#if 0
event.Skip(); // Allow menu shortcut processing
#endif
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment