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
f578abcc
Commit
f578abcc
authored
Sep 02, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pad move/drag/edit hotkeys id board editor (Marco Mattila'patches)
parent
daa12ba9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
22 deletions
+100
-22
TODO.txt
TODO.txt
+1
-5
AboutDialog_main.cpp
common/dialog_about/AboutDialog_main.cpp
+2
-0
wxPcbStruct.h
include/wxPcbStruct.h
+2
-0
hotkeys.cpp
pcbnew/hotkeys.cpp
+91
-11
onrightclick.cpp
pcbnew/onrightclick.cpp
+4
-6
No files found.
TODO.txt
View file @
f578abcc
...
...
@@ -5,8 +5,6 @@ WXMAC Platform
--------------
* Fix hotkey list to match CMD key
* Fix AddHotkeyName to let wxWidgets handle Ctrl to CMD key
* Fix About dialog crash, or trash wxAboutDialog and create our own
About dialog to match all platforms. (wxAboutDialog different on platforms)
* Fix toolbar button tooltips.
Common
...
...
@@ -14,12 +12,10 @@ Common
* Grep for @TODO or TODO for sourcecode tasks
* Use doxygen compatible comments on member functions (.h files)
* Add tooltip text to all non-obvious controls in every dialog window.
Need to do this using DialogBlocks
.
Use wxFormBuilder
.
* Component and module search displays in which library the
module or component lives.
* List auto up and down scrolling.
* Integer/long/double input boxes should handle comma and dot separated values,
not only comma.
* Push file open semantics down to one of the base frame classes ( likely candidate is
WinEDA_BasicFrame ) so that file open behavior is consistent across all applications.
...
...
common/dialog_about/AboutDialog_main.cpp
View file @
f578abcc
...
...
@@ -200,6 +200,8 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
wxT
(
"http://boolean.klaasholwerda.nl/bool.html"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Lorenzo Marcantonio"
),
wxT
(
"lomarcan@tin.it"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Marco Serantoni"
),
wxT
(
"marco.serantoni@gmail.com"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Marco Mattila"
),
wxT
(
"marcom99@gmail.com"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Rafael Sokolowski"
),
wxT
(
"rafael.sokolowski@web.de"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Rok Markovic"
),
wxT
(
"rok@kanardia.eu"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Tim Hanson"
),
wxT
(
"sideskate@gmail.com"
)
)
);
info
.
AddDeveloper
(
new
Contributor
(
wxT
(
"Vesa Solonen"
),
wxT
(
"vesa.solonen@hut.fi"
)
)
);
...
...
include/wxPcbStruct.h
View file @
f578abcc
...
...
@@ -277,6 +277,8 @@ public:
*/
bool
OnHotkeyDeleteItem
(
wxDC
*
aDC
);
bool
OnHotkeyEditItem
(
int
aIdCommand
);
/** Function OnHotkeyMoveItem
* Moves or drag the item (footprint, track, text .. ) found under the mouse cursor
* Only a footprint or a track can be dragged
...
...
pcbnew/hotkeys.cpp
View file @
f578abcc
...
...
@@ -503,15 +503,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* aDC, int aHotkeyCode, EDA_BaseStruct* aIte
break
;
case
HK_EDIT_ITEM
:
// Edit board item
if
(
!
itemCurrentlyEdited
)
{
BOARD_ITEM
*
item
=
PcbGeneralLocateAndDisplay
();
if
(
item
==
NULL
)
break
;
//An item is found, and some can be edited:
OnEditItemRequest
(
aDC
,
item
);
}
OnHotkeyEditItem
(
HK_EDIT_ITEM
);
break
;
// Footprint edition:
...
...
@@ -908,6 +900,90 @@ bool WinEDA_PcbFrame::OnHotkeyDeleteItem( wxDC* aDC )
return
true
;
}
bool
WinEDA_PcbFrame
::
OnHotkeyEditItem
(
int
aIdCommand
)
{
BOARD_ITEM
*
item
=
GetCurItem
();
bool
itemCurrentlyEdited
=
item
&&
item
->
m_Flags
;
if
(
itemCurrentlyEdited
)
return
false
;
item
=
PcbGeneralLocateAndDisplay
();
if
(
item
==
NULL
)
return
false
;
SetCurItem
(
item
);
int
evt_type
=
0
;
//Used to post a wxCommandEvent on demand
switch
(
item
->
Type
()
)
{
case
TYPE_TRACK
:
case
TYPE_VIA
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_TRACKSEG
;
break
;
case
TYPE_TEXTE
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_TEXTEPCB
;
break
;
case
TYPE_MODULE
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_MODULE
;
break
;
case
TYPE_PAD
:
// Post a EDIT_MODULE event here to prevent pads
// from being edited by hotkeys.
// Process_Special_Functions takes care of finding
// the parent.
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_MODULE
;
break
;
case
TYPE_MIRE
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_MIRE
;
break
;
case
TYPE_DIMENSION
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_DIMENSION
;
break
;
case
TYPE_TEXTE_MODULE
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_TEXTMODULE
;
break
;
case
TYPE_DRAWSEGMENT
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_DRAWING
;
break
;
case
TYPE_ZONE_CONTAINER
:
if
(
aIdCommand
==
HK_EDIT_ITEM
)
evt_type
=
ID_POPUP_PCB_EDIT_ZONE_PARAMS
;
break
;
default
:
break
;
}
if
(
evt_type
!=
0
)
{
wxCommandEvent
evt
(
wxEVT_COMMAND_MENU_SELECTED
);
evt
.
SetEventObject
(
this
);
evt
.
SetId
(
evt_type
);
wxPostEvent
(
this
,
evt
);
return
true
;
}
return
false
;
}
/** Function OnHotkeyMoveItem
* Move or drag the item (footprint, track, text .. ) found under the mouse cursor
...
...
@@ -953,10 +1029,14 @@ bool WinEDA_PcbFrame::OnHotkeyMoveItem( int aIdCommand )
break
;
case
TYPE_PAD
:
// Post MODULE_REQUEST events here to prevent pads
// from being moved or dragged by hotkeys.
// Process_Special_Functions takes care of finding
// the parent.
if
(
aIdCommand
==
HK_MOVE_ITEM
)
evt_type
=
ID_POPUP_PCB_MOVE_
PAD
_REQUEST
;
evt_type
=
ID_POPUP_PCB_MOVE_
MODULE
_REQUEST
;
if
(
aIdCommand
==
HK_DRAG_ITEM
)
evt_type
=
ID_POPUP_PCB_DRAG_
PAD
_REQUEST
;
evt_type
=
ID_POPUP_PCB_DRAG_
MODULE
_REQUEST
;
break
;
case
TYPE_TEXTE
:
...
...
pcbnew/onrightclick.cpp
View file @
f578abcc
...
...
@@ -741,15 +741,13 @@ void WinEDA_PcbFrame::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu )
sub_menu_Pad
=
new
wxMenu
;
ADD_MENUITEM_WITH_SUBMENU
(
menu
,
sub_menu_Pad
,
-
1
,
msg
,
pad_xpm
);
msg
=
AddHotkeyName
(
_
(
"Move"
),
s_Board_Editor_Hokeys_Descr
,
HK_MOVE_ITEM
);
ADD_MENUITEM
(
sub_menu_Pad
,
ID_POPUP_PCB_MOVE_PAD_REQUEST
,
msg
,
move_pad_xpm
);
msg
=
AddHotkeyName
(
_
(
"Drag"
),
s_Board_Editor_Hokeys_Descr
,
HK_DRAG_ITEM
);
_
(
"Move"
),
move_pad_xpm
);
ADD_MENUITEM
(
sub_menu_Pad
,
ID_POPUP_PCB_DRAG_PAD_REQUEST
,
msg
,
drag_pad_xpm
);
_
(
"Drag"
)
,
drag_pad_xpm
);
msg
=
AddHotkeyName
(
_
(
"Edit Pad"
),
s_Board_Editor_Hokeys_Descr
,
HK_EDIT_ITEM
);
ADD_MENUITEM
(
sub_menu_Pad
,
ID_POPUP_PCB_EDIT_PAD
,
msg
,
options_pad_xpm
);
ADD_MENUITEM
(
sub_menu_Pad
,
ID_POPUP_PCB_EDIT_PAD
,
_
(
"Edit"
)
,
options_pad_xpm
);
sub_menu_Pad
->
AppendSeparator
();
ADD_MENUITEM_WITH_HELP
(
sub_menu_Pad
,
ID_POPUP_PCB_IMPORT_PAD_SETTINGS
,
...
...
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