@@ -310,7 +310,10 @@ def getIDinfo(self, event):
310310 and 0 <= xPos and xPos < self .model .currentView .h_res :
311311 cell_id = int (self .model .cell_ids [yPos , xPos ])
312312 mat_id = int (self .model .mat_ids [yPos , xPos ])
313- id = self ._domainId (cell_id , mat_id )
313+ if cell_id < _OVERLAP :
314+ id = cell_id
315+ else :
316+ id = cell_id if self .model .currentView .colorby == 'cell' else mat_id
314317 instance = self .model .instances [yPos , xPos ]
315318 temp = "{:g}" .format (self .model .property_data [yPos , xPos , 0 ])
316319 density = "{:g}" .format (self .model .property_data [yPos , xPos , 1 ])
@@ -338,13 +341,6 @@ def getIDinfo(self, event):
338341
339342 return id , instance , properties , domain , domain_kind
340343
341- def _domainId (self , cell_id , mat_id ):
342- if self .model .currentView .colorby != 'cell' :
343- return mat_id
344- if cell_id == _OVERLAP and mat_id < _OVERLAP :
345- return mat_id
346- return cell_id
347-
348344 def _cellLabel (self , cell_id ):
349345 try :
350346 name = self .model .activeView .cells [cell_id ].name
@@ -357,10 +353,10 @@ def _overlapInfo(self, id):
357353 return "OVERLAP"
358354
359355 overlap_idx = int (_OVERLAP - int (id ) - 1 )
360- if overlap_idx not in self .model .overlap_map :
356+ if not 0 <= overlap_idx < len ( self .model .overlap_info ) :
361357 return "OVERLAP (unknown region)"
362358
363- universe , cell1 , cell2 = self .model .overlap_map [overlap_idx ]
359+ universe , cell1 , cell2 = self .model .overlap_info [overlap_idx ]
364360 label1 = self ._cellLabel (cell1 )
365361 label2 = self ._cellLabel (cell2 )
366362 return f"OVERLAP: Universe { universe } , Cells { label1 } and { label2 } "
0 commit comments