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
8e584fc2
Commit
8e584fc2
authored
Oct 24, 2011
by
Andrey Fedorushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema:
* Fix bug in draw reference for multiunit component * Code cleanup for drag item
parent
4e626d44
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
17 deletions
+14
-17
eeschema_id.h
eeschema/eeschema_id.h
+1
-2
hotkeys.cpp
eeschema/hotkeys.cpp
+2
-2
onrightclick.cpp
eeschema/onrightclick.cpp
+7
-7
sch_field.cpp
eeschema/sch_field.cpp
+2
-2
schedit.cpp
eeschema/schedit.cpp
+2
-4
No files found.
eeschema/eeschema_id.h
View file @
8e584fc2
...
@@ -94,8 +94,7 @@ enum id_eeschema_frm
...
@@ -94,8 +94,7 @@ enum id_eeschema_frm
ID_POPUP_SCH_DELETE_CONNECTION
,
ID_POPUP_SCH_DELETE_CONNECTION
,
ID_POPUP_SCH_DELETE_NODE
,
ID_POPUP_SCH_DELETE_NODE
,
ID_POPUP_SCH_DELETE_CMP
,
ID_POPUP_SCH_DELETE_CMP
,
ID_POPUP_SCH_DRAG_CMP_REQUEST
,
ID_POPUP_SCH_DRAG_ITEM_REQUEST
,
ID_POPUP_SCH_DRAG_WIRE_REQUEST
,
ID_POPUP_SCH_UNUSED_2
,
ID_POPUP_SCH_UNUSED_2
,
ID_POPUP_SCH_ENTRY_SELECT_SLASH
,
ID_POPUP_SCH_ENTRY_SELECT_SLASH
,
ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH
,
ID_POPUP_SCH_ENTRY_SELECT_ANTISLASH
,
...
...
eeschema/hotkeys.cpp
View file @
8e584fc2
...
@@ -165,7 +165,7 @@ static EDA_HOTKEY HkCopyComponentOrText( wxT( "Copy Component or Label" ),
...
@@ -165,7 +165,7 @@ static EDA_HOTKEY HkCopyComponentOrText( wxT( "Copy Component or Label" ),
ID_POPUP_SCH_COPY_ITEM
);
ID_POPUP_SCH_COPY_ITEM
);
static
EDA_HOTKEY
HkDrag
(
wxT
(
"Drag Schematic Item"
),
HK_DRAG
,
'G'
,
static
EDA_HOTKEY
HkDrag
(
wxT
(
"Drag Schematic Item"
),
HK_DRAG
,
'G'
,
ID_POPUP_SCH_DRAG_
CMP
_REQUEST
);
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
);
static
EDA_HOTKEY
HkMove2Drag
(
wxT
(
"Move Block -> Drag Block"
),
static
EDA_HOTKEY
HkMove2Drag
(
wxT
(
"Move Block -> Drag Block"
),
HK_MOVEBLOCK_TO_DRAGBLOCK
,
'\t'
);
HK_MOVEBLOCK_TO_DRAGBLOCK
,
'\t'
);
static
EDA_HOTKEY
HkInsert
(
wxT
(
"Repeat Last Item"
),
HK_REPEAT_LAST
,
WXK_INSERT
);
static
EDA_HOTKEY
HkInsert
(
wxT
(
"Repeat Last Item"
),
HK_REPEAT_LAST
,
WXK_INSERT
);
...
@@ -717,7 +717,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
...
@@ -717,7 +717,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
case
SCH_JUNCTION_T
:
case
SCH_JUNCTION_T
:
if
(
((
SCH_ITEM
*
)
aItem
)
->
GetLayer
()
!=
LAYER_BUS
)
if
(
((
SCH_ITEM
*
)
aItem
)
->
GetLayer
()
!=
LAYER_BUS
)
{
{
cmd
.
SetId
(
ID_POPUP_SCH_DRAG_WIRE_REQUEST
);
cmd
.
SetId
(
hotKey
->
m_IdMenuEvent
);
wxPostEvent
(
this
,
cmd
);
wxPostEvent
(
this
,
cmd
);
}
}
...
...
eeschema/onrightclick.cpp
View file @
8e584fc2
...
@@ -280,7 +280,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
...
@@ -280,7 +280,7 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
msg
=
AddHotkeyName
(
msg
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_ITEM
);
msg
=
AddHotkeyName
(
msg
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT_OR_ITEM
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
CMP
_REQUEST
,
msg
,
KiBitmap
(
move_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
msg
,
KiBitmap
(
move_xpm
)
);
}
}
wxMenu
*
orientmenu
=
new
wxMenu
;
wxMenu
*
orientmenu
=
new
wxMenu
;
...
@@ -377,7 +377,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
...
@@ -377,7 +377,7 @@ void AddMenusForGLabel( wxMenu* PopMenu, SCH_GLOBALLABEL* GLabel )
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_text_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Drag Global Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Drag Global Label"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
HK_DRAG
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
CMP
_REQUEST
,
msg
,
KiBitmap
(
move_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
msg
,
KiBitmap
(
move_text_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Copy Global Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Copy Global Label"
),
s_Schematic_Hokeys_Descr
,
HK_COPY_COMPONENT_OR_LABEL
);
HK_COPY_COMPONENT_OR_LABEL
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_COPY_ITEM
,
msg
,
KiBitmap
(
copy_button_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_COPY_ITEM
,
msg
,
KiBitmap
(
copy_button_xpm
)
);
...
@@ -413,7 +413,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
...
@@ -413,7 +413,7 @@ void AddMenusForHLabel( wxMenu* PopMenu, SCH_HIERLABEL* HLabel )
HK_MOVE_COMPONENT_OR_ITEM
);
HK_MOVE_COMPONENT_OR_ITEM
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_text_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Drag Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
msg
=
AddHotkeyName
(
_
(
"Drag Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
CMP
_REQUEST
,
msg
,
KiBitmap
(
move_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
msg
,
KiBitmap
(
move_text_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Copy Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Copy Hierarchical Label"
),
s_Schematic_Hokeys_Descr
,
HK_COPY_COMPONENT_OR_LABEL
);
HK_COPY_COMPONENT_OR_LABEL
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_COPY_ITEM
,
msg
,
KiBitmap
(
copy_button_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_COPY_ITEM
,
msg
,
KiBitmap
(
copy_button_xpm
)
);
...
@@ -449,7 +449,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
...
@@ -449,7 +449,7 @@ void AddMenusForLabel( wxMenu* PopMenu, SCH_LABEL* Label )
HK_MOVE_COMPONENT_OR_ITEM
);
HK_MOVE_COMPONENT_OR_ITEM
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_text_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Drag Label"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
msg
=
AddHotkeyName
(
_
(
"Drag Label"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
CMP
_REQUEST
,
msg
,
KiBitmap
(
move_text_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
msg
,
KiBitmap
(
move_text_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Copy Label"
),
s_Schematic_Hokeys_Descr
,
msg
=
AddHotkeyName
(
_
(
"Copy Label"
),
s_Schematic_Hokeys_Descr
,
HK_COPY_COMPONENT_OR_LABEL
);
HK_COPY_COMPONENT_OR_LABEL
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_COPY_ITEM
,
msg
,
KiBitmap
(
copy_button_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_COPY_ITEM
,
msg
,
KiBitmap
(
copy_button_xpm
)
);
...
@@ -524,7 +524,7 @@ void SCH_EDIT_FRAME::addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunct
...
@@ -524,7 +524,7 @@ void SCH_EDIT_FRAME::addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunct
if
(
!
aJunction
->
IsNew
()
)
if
(
!
aJunction
->
IsNew
()
)
{
{
if
(
m_collectedItems
.
IsDraggableJunction
()
)
if
(
m_collectedItems
.
IsDraggableJunction
()
)
AddMenuItem
(
aMenu
,
ID_POPUP_SCH_DRAG_
WIRE
_REQUEST
,
_
(
"Drag Junction"
),
AddMenuItem
(
aMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
_
(
"Drag Junction"
),
KiBitmap
(
move_xpm
)
);
KiBitmap
(
move_xpm
)
);
if
(
screen
->
GetWire
(
aJunction
->
GetPosition
(),
EXCLUDE_END_POINTS_T
)
)
if
(
screen
->
GetWire
(
aJunction
->
GetPosition
(),
EXCLUDE_END_POINTS_T
)
)
...
@@ -556,7 +556,7 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
...
@@ -556,7 +556,7 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
}
}
msg
=
AddHotkeyName
(
_
(
"Drag Wire"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
msg
=
AddHotkeyName
(
_
(
"Drag Wire"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
WIRE
_REQUEST
,
msg
,
KiBitmap
(
move_track_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
msg
,
KiBitmap
(
move_track_xpm
)
);
PopMenu
->
AppendSeparator
();
PopMenu
->
AppendSeparator
();
msg
=
AddHotkeyName
(
_
(
"Delete Wire"
),
s_Schematic_Hokeys_Descr
,
HK_DELETE
);
msg
=
AddHotkeyName
(
_
(
"Delete Wire"
),
s_Schematic_Hokeys_Descr
,
HK_DELETE
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DELETE
,
msg
,
KiBitmap
(
delete_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DELETE
,
msg
,
KiBitmap
(
delete_xpm
)
);
...
@@ -629,7 +629,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
...
@@ -629,7 +629,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_sheet_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_MOVE_ITEM
,
msg
,
KiBitmap
(
move_sheet_xpm
)
);
msg
=
AddHotkeyName
(
_
(
"Drag Sheet"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
msg
=
AddHotkeyName
(
_
(
"Drag Sheet"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
CMP
_REQUEST
,
msg
,
KiBitmap
(
move_sheet_xpm
)
);
AddMenuItem
(
PopMenu
,
ID_POPUP_SCH_DRAG_
ITEM
_REQUEST
,
msg
,
KiBitmap
(
move_sheet_xpm
)
);
}
}
if
(
Sheet
->
GetFlags
()
)
if
(
Sheet
->
GetFlags
()
)
...
...
eeschema/sch_field.cpp
View file @
8e584fc2
...
@@ -99,7 +99,7 @@ wxString SCH_FIELD::GetText() const
...
@@ -99,7 +99,7 @@ wxString SCH_FIELD::GetText() const
wxCHECK_MSG
(
component
!=
NULL
,
text
,
wxCHECK_MSG
(
component
!=
NULL
,
text
,
wxT
(
"No component associated with field"
)
+
text
);
wxT
(
"No component associated with field"
)
+
text
);
if
(
component
->
GetPartCount
()
>
1
)
text
<<
LIB_COMPONENT
::
ReturnSubReference
(
component
->
GetUnit
()
);
text
<<
LIB_COMPONENT
::
ReturnSubReference
(
component
->
GetUnit
()
);
}
}
...
...
eeschema/schedit.cpp
View file @
8e584fc2
...
@@ -78,8 +78,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -78,8 +78,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_SCH_RESIZE_SHEET
:
case
ID_POPUP_SCH_RESIZE_SHEET
:
case
ID_POPUP_IMPORT_GLABEL
:
case
ID_POPUP_IMPORT_GLABEL
:
case
ID_POPUP_SCH_EDIT_SHEET_PIN
:
case
ID_POPUP_SCH_EDIT_SHEET_PIN
:
case
ID_POPUP_SCH_DRAG_CMP_REQUEST
:
case
ID_POPUP_SCH_DRAG_ITEM_REQUEST
:
case
ID_POPUP_SCH_DRAG_WIRE_REQUEST
:
case
ID_POPUP_SCH_EDIT_CMP
:
case
ID_POPUP_SCH_EDIT_CMP
:
case
ID_POPUP_SCH_INIT_CMP
:
case
ID_POPUP_SCH_INIT_CMP
:
case
ID_POPUP_SCH_DISPLAYDOC_CMP
:
case
ID_POPUP_SCH_DISPLAYDOC_CMP
:
...
@@ -281,8 +280,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -281,8 +280,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
EditSheetPin
(
(
SCH_SHEET_PIN
*
)
item
,
&
dc
);
EditSheetPin
(
(
SCH_SHEET_PIN
*
)
item
,
&
dc
);
break
;
break
;
case
ID_POPUP_SCH_DRAG_CMP_REQUEST
:
case
ID_POPUP_SCH_DRAG_ITEM_REQUEST
:
case
ID_POPUP_SCH_DRAG_WIRE_REQUEST
:
DrawPanel
->
MoveCursorToCrossHair
();
DrawPanel
->
MoveCursorToCrossHair
();
// The easiest way to handle a drag component or sheet command
// The easiest way to handle a drag component or sheet command
...
...
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