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
03f7003c
Commit
03f7003c
authored
Nov 24, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: Unconnected items share the same NETINFO_ITEM, even if on different boards.
parent
30c7821b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
class_board.cpp
pcbnew/class_board.cpp
+4
-2
class_board_connected_item.cpp
pcbnew/class_board_connected_item.cpp
+1
-9
No files found.
pcbnew/class_board.cpp
View file @
03f7003c
...
...
@@ -1214,9 +1214,11 @@ NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const
// the first valid netcode is 1 and the last is m_NetInfo.GetCount()-1.
// zero is reserved for "no connection" and is not used.
// NULL is returned for non valid netcodes
NETINFO_ITEM
*
net
=
m_NetInfo
.
GetNetItem
(
aNetcode
);
return
net
;
if
(
aNetcode
==
NETINFO_LIST
::
UNCONNECTED
)
return
&
NETINFO_LIST
::
ORPHANED
;
else
return
m_NetInfo
.
GetNetItem
(
aNetcode
);
}
...
...
pcbnew/class_board_connected_item.cpp
View file @
03f7003c
...
...
@@ -53,19 +53,11 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem )
void
BOARD_CONNECTED_ITEM
::
SetNetCode
(
int
aNetCode
)
{
BOARD
*
board
=
GetBoard
();
if
(
board
)
{
m_netinfo
=
board
->
FindNet
(
aNetCode
);
// The requested net does not exist, mark it as unconnected
if
(
m_netinfo
==
NULL
)
m_netinfo
=
board
->
FindNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
else
{
// There is no board that contains list of nets, the item is orphaned
m_netinfo
=
&
NETINFO_LIST
::
ORPHANED
;
}
}
...
...
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