Skip to content

Commit 15756d1

Browse files
committed
More robust track checking, for KiKit compatibility
1 parent 4159d7f commit 15756d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

round_tracks_action.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def addIntermediateTracks( self, scaling = RADIUS_DEFAULT, netclass = None, nati
201201
viasInNet = []
202202
for t in allTracks:
203203
if t.GetNetCode() == netcode and (not onlySelection or t.IsSelected()):
204-
if type(t) == pcbnew.PCB_VIA:
204+
if t.GetClass() == 'PCB_VIA':
205205
viasInNet.append(t)
206206
else:
207207
tracksInNet.append(t)
@@ -277,7 +277,7 @@ def addIntermediateTracks( self, scaling = RADIUS_DEFAULT, netclass = None, nati
277277
# if there are any arcs or vias present, skip the intersection entirely
278278
skip = False
279279
for t1 in tracksHere:
280-
if type(t1) != pcbnew.PCB_TRACK:
280+
if t1.GetClass() != 'PCB_TRACK':
281281
skip = True
282282
break
283283

0 commit comments

Comments
 (0)