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
b19010ff
Commit
b19010ff
authored
Feb 14, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cross-probing pcbnew<->eeschema (GAL).
parent
bb861b81
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
cross-probing.cpp
pcbnew/cross-probing.cpp
+13
-2
pcb_editor_control.cpp
pcbnew/tools/pcb_editor_control.cpp
+16
-0
pcb_editor_control.h
pcbnew/tools/pcb_editor_control.h
+3
-0
selection_tool.cpp
pcbnew/tools/selection_tool.cpp
+1
-0
No files found.
pcbnew/cross-probing.cpp
View file @
b19010ff
...
...
@@ -25,6 +25,8 @@
#include <collectors.h>
#include <pcbnew.h>
#include <tools/common_actions.h>
#include <pcb_draw_panel_gal.h>
/* Execute a remote command send by Eeschema via a socket,
* port KICAD_PCB_PORT_SERVICE_NUMBER
...
...
@@ -127,8 +129,17 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
if
(
module
)
// if found, center the module on screen, and redraw the screen.
{
SetCrossHairPosition
(
pos
);
RedrawScreen
(
pos
,
false
);
if
(
IsGalCanvasActive
()
)
{
GetGalCanvas
()
->
GetView
()
->
SetCenter
(
VECTOR2D
(
module
->
GetPosition
()
)
);
m_toolManager
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
m_toolManager
->
RunAction
(
COMMON_ACTIONS
::
selectItem
,
true
,
module
);
}
else
{
SetCrossHairPosition
(
pos
);
RedrawScreen
(
pos
,
false
);
}
}
}
...
...
pcbnew/tools/pcb_editor_control.cpp
View file @
b19010ff
...
...
@@ -238,6 +238,20 @@ int PCB_EDITOR_CONTROL::ZoneUnfillAll( const TOOL_EVENT& aEvent )
}
int
PCB_EDITOR_CONTROL
::
SelectionCrossProbe
(
const
TOOL_EVENT
&
aEvent
)
{
SELECTION_TOOL
*
selTool
=
m_toolMgr
->
GetTool
<
SELECTION_TOOL
>
();
const
SELECTION
&
selection
=
selTool
->
GetSelection
();
if
(
selection
.
Size
()
==
1
)
m_frame
->
SendMessageToEESCHEMA
(
selection
.
Item
<
BOARD_ITEM
>
(
0
)
);
setTransitions
();
return
0
;
}
void
PCB_EDITOR_CONTROL
::
setTransitions
()
{
// Track & via size control
...
...
@@ -251,4 +265,6 @@ void PCB_EDITOR_CONTROL::setTransitions()
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneFillAll
,
COMMON_ACTIONS
::
zoneFillAll
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneUnfill
,
COMMON_ACTIONS
::
zoneUnfill
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
ZoneUnfillAll
,
COMMON_ACTIONS
::
zoneUnfillAll
.
MakeEvent
()
);
Go
(
&
PCB_EDITOR_CONTROL
::
SelectionCrossProbe
,
SELECTION_TOOL
::
SelectedEvent
);
}
pcbnew/tools/pcb_editor_control.h
View file @
b19010ff
...
...
@@ -57,6 +57,9 @@ public:
int
ZoneUnfill
(
const
TOOL_EVENT
&
aEvent
);
int
ZoneUnfillAll
(
const
TOOL_EVENT
&
aEvent
);
///> Notifies eeschema about the selected item.
int
SelectionCrossProbe
(
const
TOOL_EVENT
&
aEvent
);
private
:
///> Sets up handlers for various events.
void
setTransitions
();
...
...
pcbnew/tools/selection_tool.cpp
View file @
b19010ff
...
...
@@ -511,6 +511,7 @@ void SELECTION_TOOL::findCallback( BOARD_ITEM* aItem )
{
clearSelection
();
select
(
aItem
);
getView
()
->
SetCenter
(
VECTOR2D
(
aItem
->
GetPosition
()
)
);
// Inform other potentially interested tools
m_toolMgr
->
ProcessEvent
(
SelectedEvent
);
...
...
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