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
03ffc937
Commit
03ffc937
authored
Jan 21, 2013
by
Jacobo Aragunde Perez
Committed by
jean-pierre charras
Jan 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: hotkey enhancement while moving a block or an item.
parent
9ededca9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
15 deletions
+29
-15
dialog_edit_component_in_schematic.cpp
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+3
-1
dialog_edit_label.cpp
eeschema/dialogs/dialog_edit_label.cpp
+3
-1
edit_bitmap.cpp
eeschema/edit_bitmap.cpp
+4
-1
hotkeys.cpp
eeschema/hotkeys.cpp
+3
-6
onrightclick.cpp
eeschema/onrightclick.cpp
+16
-6
No files found.
eeschema/dialogs/dialog_edit_component_in_schematic.cpp
View file @
03ffc937
...
...
@@ -223,7 +223,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event
}
// save old cmp in undo list if not already in edit, or moving ...
if
(
m_Cmp
->
m_Flags
==
0
)
// or the component to be edited is part of a block
if
(
m_Cmp
->
m_Flags
==
0
||
m_Parent
->
GetScreen
()
->
m_BlockLocate
.
GetState
()
!=
STATE_NO_BLOCK
)
m_Parent
->
SaveCopyInUndoList
(
m_Cmp
,
UR_CHANGED
);
copyPanelToOptions
();
...
...
eeschema/dialogs/dialog_edit_label.cpp
View file @
03ffc937
...
...
@@ -247,7 +247,9 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent )
int
value
;
/* save old text in undo list if not already in edit */
if
(
m_CurrentText
->
GetFlags
()
==
0
)
/* or the label to be edited is part of a block */
if
(
m_CurrentText
->
GetFlags
()
==
0
||
m_Parent
->
GetScreen
()
->
m_BlockLocate
.
GetState
()
!=
STATE_NO_BLOCK
)
m_Parent
->
SaveCopyInUndoList
(
m_CurrentText
,
UR_CHANGED
);
m_Parent
->
GetCanvas
()
->
RefreshDrawingRect
(
m_CurrentText
->
GetBoundingBox
()
);
...
...
eeschema/edit_bitmap.cpp
View file @
03ffc937
...
...
@@ -187,7 +187,10 @@ void SCH_EDIT_FRAME::EditImage( SCH_BITMAP* aItem )
if
(
dlg
.
ShowModal
()
!=
wxID_OK
)
return
;
if
(
aItem
->
GetFlags
(
)
==
0
)
// save old image in undo list if not already in edit
// or the image to be edited is part of a block
if
(
aItem
->
GetFlags
()
==
0
||
GetScreen
()
->
m_BlockLocate
.
GetState
()
!=
STATE_NO_BLOCK
)
SaveCopyInUndoList
(
aItem
,
UR_CHANGED
);
dlg
.
TransfertToImage
(
aItem
->
m_Image
);
...
...
eeschema/hotkeys.cpp
View file @
03ffc937
...
...
@@ -491,10 +491,6 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
case
HK_DRAG
:
// Start drag
case
HK_MOVE_COMPONENT_OR_ITEM
:
// Start move schematic item.
case
HK_EDIT_COMPONENT_VALUE
:
// Edit component value field.
case
HK_EDIT_COMPONENT_REFERENCE
:
// Edit component value reference.
case
HK_EDIT_COMPONENT_FOOTPRINT
:
// Edit component footprint field.
// These commands are allowed only when no item currently edited.
if
(
!
notBusy
)
break
;
...
...
@@ -506,12 +502,13 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break
;
// Fall through
case
HK_EDIT_COMPONENT_VALUE
:
// Edit component value field.
case
HK_EDIT_COMPONENT_REFERENCE
:
// Edit component value reference.
case
HK_EDIT_COMPONENT_FOOTPRINT
:
// Edit component footprint field.
case
HK_MIRROR_Y_COMPONENT
:
// Mirror Y
case
HK_MIRROR_X_COMPONENT
:
// Mirror X
case
HK_ORIENT_NORMAL_COMPONENT
:
// Orient 0, no mirror (Component)
case
HK_ROTATE
:
// Rotate schematic item.
if
(
blocInProgress
)
break
;
{
// force a new item search on hot keys at current position,
// if there is no currently edited item,
...
...
eeschema/onrightclick.cpp
View file @
03ffc937
...
...
@@ -123,6 +123,12 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
PopMenu
->
AppendSeparator
();
break
;
case
SCH_BITMAP_T
:
msg
=
AddHotkeyName
(
_
(
"Edit Image"
),
s_Schematic_Hokeys_Descr
,
HK_EDIT
);
AddMenuItem
(
PopMenu
,
ID_SCH_EDIT_ITEM
,
msg
,
KiBitmap
(
image_xpm
)
);
PopMenu
->
AppendSeparator
();
break
;
default
:
break
;
}
...
...
@@ -819,8 +825,8 @@ void AddMenusForBlock( wxMenu* PopMenu, SCH_EDIT_FRAME* frame )
msg
=
AddHotkeyName
(
_
(
"Mirror Block --"
),
s_Schematic_Hokeys_Descr
,
HK_MIRROR_X_COMPONENT
);
AddMenuItem
(
PopMenu
,
ID_SCH_MIRROR_X
,
msg
,
KiBitmap
(
mirror_v_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_SCH_ROTATE_CLOCKWISE
,
_
(
"Rotate Block ccw"
),
KiBitmap
(
rotate_ccw_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Rotate Block ccw"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE
);
AddMenuItem
(
PopMenu
,
ID_SCH_ROTATE_CLOCKWISE
,
msg
,
KiBitmap
(
rotate_ccw_xpm
)
);
#if 0
#ifdef __WINDOWS__
...
...
@@ -851,13 +857,17 @@ void AddMenusForBitmap( wxMenu* aPopMenu, SCH_BITMAP * aBitmap )
msg
=
AddHotkeyName
(
_
(
"Rotate Image"
),
s_Schematic_Hokeys_Descr
,
HK_ROTATE
);
AddMenuItem
(
aPopMenu
,
ID_SCH_ROTATE_CLOCKWISE
,
msg
,
KiBitmap
(
rotate_ccw_xpm
)
);
AddMenuItem
(
aPopMenu
,
ID_SCH_MIRROR_X
,
_
(
"Mirror --"
),
KiBitmap
(
mirror_v_xpm
)
);
AddMenuItem
(
aPopMenu
,
ID_SCH_MIRROR_Y
,
_
(
"Mirror ||"
),
KiBitmap
(
mirror_h_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Mirror --"
),
s_Schematic_Hokeys_Descr
,
HK_MIRROR_X_COMPONENT
);
AddMenuItem
(
aPopMenu
,
ID_SCH_MIRROR_X
,
msg
,
KiBitmap
(
mirror_v_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Mirror ||"
),
s_Schematic_Hokeys_Descr
,
HK_MIRROR_Y_COMPONENT
);
AddMenuItem
(
aPopMenu
,
ID_SCH_MIRROR_Y
,
msg
,
KiBitmap
(
mirror_h_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Edit Image"
),
s_Schematic_Hokeys_Descr
,
HK_EDIT
);
AddMenuItem
(
aPopMenu
,
ID_SCH_EDIT_ITEM
,
msg
,
KiBitmap
(
image_xpm
)
);
if
(
aBitmap
->
GetFlags
()
==
0
)
{
msg
=
AddHotkeyName
(
_
(
"Edit Image"
),
s_Schematic_Hokeys_Descr
,
HK_EDIT
);
AddMenuItem
(
aPopMenu
,
ID_SCH_EDIT_ITEM
,
msg
,
KiBitmap
(
image_xpm
)
);
aPopMenu
->
AppendSeparator
();
msg
=
AddHotkeyName
(
_
(
"Delete Image"
),
s_Schematic_Hokeys_Descr
,
HK_DELETE
);
AddMenuItem
(
aPopMenu
,
ID_POPUP_SCH_DELETE
,
msg
,
KiBitmap
(
delete_xpm
)
);
...
...
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