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
64032f34
Commit
64032f34
authored
Oct 16, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit hotkeys patch from Jonas Diemer
parent
ce1fe284
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
6 deletions
+76
-6
hotkeys.cpp
eeschema/hotkeys.cpp
+75
-6
hotkeys.h
eeschema/hotkeys.h
+1
-0
No files found.
eeschema/hotkeys.cpp
View file @
64032f34
...
...
@@ -76,6 +76,8 @@ static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ),
HK_ORIENT_NORMAL_COMPONENT
,
'N'
);
static
Ki_HotkeyInfo
HkRotateComponent
(
wxT
(
"Rotate Component"
),
HK_ROTATE_COMPONENT
,
'R'
);
static
Ki_HotkeyInfo
HkEditComponent
(
wxT
(
"Edit Component"
),
HK_EDIT_COMPONENT
,
'E'
);
static
Ki_HotkeyInfo
HkEditComponentValue
(
wxT
(
"Edit Component Value"
),
HK_EDIT_COMPONENT_VALUE
,
'V'
);
static
Ki_HotkeyInfo
HkEditComponentFootprint
(
wxT
(
"Edit Component Footprint"
),
...
...
@@ -123,7 +125,7 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] =
&
HkMoveComponent
,
&
HkDragComponent
,
&
HkAddComponent
,
&
HkRotateComponent
,
&
HkMirrorXComponent
,
&
HkMirrorYComponent
,
&
HkOrientNormalComponent
,
&
HkEditComponentValue
,
&
HkEditComponentFootprint
,
&
HkEditComponent
,
&
HkEditComponent
Value
,
&
HkEditComponentFootprint
,
&
HkBeginWire
,
NULL
};
...
...
@@ -418,15 +420,82 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
case
HK_MOVE_COMPONENT
:
// Start move Component
if
(
ItemInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
==
0
)
)
{
GetScreen
()
->
SetCurItem
(
(
SCH_ITEM
*
)
DrawStruct
);
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
DrawStruct
=
PickStruct
(
GetScreen
()
->
m_Curseur
,
GetScreen
(),
LIBITEM
|
TEXTITEM
|
LABELITEM
);
if
(
DrawStruct
==
NULL
)
break
;
if
(
DrawStruct
->
Type
()
==
TYPE_SCH_COMPONENT
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
if
(
DrawStruct
==
NULL
)
break
;
}
switch
(
DrawStruct
->
Type
()
)
{
case
TYPE_SCH_COMPONENT
:
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
==
0
)
)
{
GetScreen
()
->
SetCurItem
(
(
SCH_ITEM
*
)
DrawStruct
);
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
HK_Descr
->
m_IdMenuEvent
);
wxPostEvent
(
this
,
event
);
}
break
;
wxPostEvent
(
this
,
event
);
case
TYPE_SCH_TEXT
:
case
TYPE_SCH_LABEL
:
case
TYPE_SCH_GLOBALLABEL
:
case
TYPE_SCH_HIERLABEL
:
if
(
DrawStruct
->
m_Flags
==
0
)
{
SaveCopyInUndoList
(
(
SCH_ITEM
*
)
DrawStruct
,
UR_CHANGED
);
RefreshToolBar
=
TRUE
;
}
StartMoveTexte
(
(
SCH_TEXT
*
)
DrawStruct
,
DC
);
break
;
default
:
;
}
break
;
case
HK_EDIT_COMPONENT
:
if
(
ItemInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
{
DrawStruct
=
PickStruct
(
GetScreen
()
->
m_Curseur
,
GetScreen
(),
LIBITEM
|
TEXTITEM
|
LABELITEM
);
if
(
DrawStruct
==
NULL
)
break
;
if
(
DrawStruct
->
Type
()
==
TYPE_SCH_COMPONENT
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
if
(
DrawStruct
==
NULL
)
break
;
}
switch
(
DrawStruct
->
Type
()
)
{
case
TYPE_SCH_COMPONENT
:
InstallCmpeditFrame
(
this
,
MousePos
,(
SCH_COMPONENT
*
)
DrawStruct
);
break
;
case
TYPE_SCH_TEXT
:
case
TYPE_SCH_LABEL
:
case
TYPE_SCH_GLOBALLABEL
:
case
TYPE_SCH_HIERLABEL
:
EditSchematicText
(
(
SCH_TEXT
*
)
DrawStruct
,
DC
);
break
;
default
:
;
}
break
;
...
...
eeschema/hotkeys.h
View file @
64032f34
...
...
@@ -25,6 +25,7 @@ enum hotkey_id_commnand {
HK_REDO
,
HK_MOVEBLOCK_TO_DRAGBLOCK
,
HK_ROTATE_COMPONENT
,
HK_EDIT_COMPONENT
,
HK_EDIT_COMPONENT_VALUE
,
HK_EDIT_COMPONENT_FOOTPRINT
,
HK_MIRROR_X_COMPONENT
,
...
...
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