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
7a92a96a
Commit
7a92a96a
authored
Nov 08, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netlist: refinements in net name selection
parent
75e613f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
netlist.cpp
eeschema/netlist.cpp
+22
-8
No files found.
eeschema/netlist.cpp
View file @
7a92a96a
...
...
@@ -405,7 +405,7 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
}
if
(
candidate_priority
>
item_priority
)
{
item
=
candidate
;
item
=
candidate
;
item_priority
=
candidate_priority
;
}
else
if
(
candidate_priority
==
item_priority
)
...
...
@@ -414,15 +414,29 @@ static NETLIST_OBJECT* FindBestNetName( NETLIST_OBJECT_LIST& aLabelItemBuffer )
// because they have no sheetpath as prefix name
// for other labels, we select them before by sheet deep order
// because the actual name is /sheetpath/label
// and for a given path lenght, by alphabetic order
if
(
(
item_priority
<
PRIO_MAX
-
1
)
&&
// Not a global label or pin label
candidate
->
m_SheetList
.
Path
().
Length
()
<
item
->
m_SheetList
.
Path
().
Length
()
)
{
item
=
candidate
;
// and for a given path length, by alphabetic order
if
(
item_priority
>=
PRIO_MAX
-
1
)
// global label or pin label
{
// selection by alphabetic order:
if
(
candidate
->
m_Label
.
Cmp
(
item
->
m_Label
)
<
0
)
item
=
candidate
;
}
else
if
(
candidate
->
m_Label
.
Cmp
(
item
->
m_Label
)
<
0
)
else
// not global: names are prefixed by their sheetpath
{
item
=
candidate
;
// use name defined in highter hierarchical sheet
// (i.e. shorter path because paths are /<timestamp1>/<timestamp2>/...
// and timestamp = 8 letters.
if
(
candidate
->
m_SheetList
.
Path
().
Length
()
<
item
->
m_SheetList
.
Path
().
Length
()
)
{
item
=
candidate
;
}
else
if
(
candidate
->
m_SheetList
.
Path
().
Length
()
==
item
->
m_SheetList
.
Path
().
Length
()
)
{
// For labels on sheets having an equivalent deep in hierarchy, use
// alphabetic label name order:
if
(
candidate
->
m_Label
.
Cmp
(
item
->
m_Label
)
<
0
)
item
=
candidate
;
}
}
}
}
...
...
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