Bug in spares.py, "rtag", the root was repeated in each level.

This commit is contained in:
Jean-Paul Chaput 2021-04-07 14:51:32 +02:00
parent df4201e1fe
commit 556c38e4b9
1 changed files with 3 additions and 6 deletions

View File

@ -283,8 +283,8 @@ class QuadTree ( object ):
return False return False
@staticmethod @staticmethod
def _create ( spares, parent, area, rtag, raiseError=False ): def _create ( spares, parent, area, tag, raiseError=False ):
childRtag = parent.rtag+'_'+rtag if parent else rtag childRtag = parent.rtag+'_'+tag if parent else tag
if QuadTree.isUsedArea( spares, area, childRtag, raiseError ): if QuadTree.isUsedArea( spares, area, childRtag, raiseError ):
return None return None
qt = QuadTree( spares, parent, area, childRtag ) qt = QuadTree( spares, parent, area, childRtag )
@ -307,9 +307,6 @@ class QuadTree ( object ):
self.bufferNet = None self.bufferNet = None
self.pool = BufferPool( self ) self.pool = BufferPool( self )
self.plugs = [] self.plugs = []
if self.parent and self.parent.rtag != '':
self.rtag = self.parent.rtag + '_' + rtag
else:
self.rtag = rtag self.rtag = rtag
def destroy ( self ): def destroy ( self ):