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
31a4334a
Commit
31a4334a
authored
Oct 12, 2011
by
Andrey Fedorushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cvpcb: add send message to eeschema when selecting item in list components
parent
d5cbd5d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
cvframe.cpp
cvpcb/cvframe.cpp
+34
-0
cvpcb_mainframe.h
cvpcb/cvpcb_mainframe.h
+8
-0
No files found.
cvpcb/cvframe.cpp
View file @
31a4334a
...
...
@@ -7,6 +7,7 @@
#include "macros.h"
#include "confirm.h"
#include "eda_doc.h"
#include "eda_dde.h"
#include "gestfich.h"
#include "param_config.h"
#include "bitmaps.h"
...
...
@@ -316,6 +317,7 @@ void CVPCB_MAINFRAME::ToFirstNA( wxCommandEvent& event )
if
(
component
.
m_Module
.
IsEmpty
()
&&
ii
>
selection
)
{
m_ListCmp
->
SetSelection
(
ii
);
SendMessageToEESCHEMA
();
return
;
}
...
...
@@ -345,6 +347,7 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event )
if
(
component
.
m_Module
.
IsEmpty
()
&&
ii
<
selection
)
{
m_ListCmp
->
SetSelection
(
ii
);
SendMessageToEESCHEMA
();
return
;
}
...
...
@@ -500,6 +503,7 @@ void CVPCB_MAINFRAME::OnSelectComponent( wxListEvent& event )
}
m_FootprintList
->
SetFootprintFilteredList
(
&
m_components
[
selection
],
m_footprints
);
SendMessageToEESCHEMA
();
DisplayStatus
();
}
...
...
@@ -617,3 +621,33 @@ void CVPCB_MAINFRAME::UpdateTitle()
SetTitle
(
title
);
}
/**
* Send a remote command to Eeschema via a socket,
* Commands are
* $PART: "reference" put cursor on component anchor
*/
void
CVPCB_MAINFRAME
::
SendMessageToEESCHEMA
()
{
char
cmd
[
1024
];
int
selection
;
COMPONENT
*
Component
;
if
(
m_components
.
empty
()
)
return
;
selection
=
m_ListCmp
->
GetSelection
();
if
(
selection
<
0
)
selection
=
0
;
if
(
&
m_components
[
selection
]
==
NULL
)
return
;
Component
=
&
m_components
[
selection
];
sprintf
(
cmd
,
"$PART:
\"
%s
\"
"
,
TO_UTF8
(
Component
->
m_Reference
)
);
SendCommand
(
MSG_TO_SCH
,
cmd
);
}
cvpcb/cvpcb_mainframe.h
View file @
31a4334a
...
...
@@ -233,6 +233,14 @@ public:
*/
void
UpdateTitle
();
/**
* Function SendMessageToEESCHEMA
* Send a remote command to Eeschema via a socket,
* Commands are
* $PART: "reference" put cursor on component anchor
*/
void
SendMessageToEESCHEMA
();
DECLARE_EVENT_TABLE
()
};
...
...
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