File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 Optional ,
2121 Tuple ,
2222 Dict ,
23+ List ,
2324)
2425from logHandler import log
2526
@@ -179,7 +180,7 @@ def _get_locationText(self):
179180 textList .append (_ ("at {x}, {y}" ).format (x = curPoint .x ,y = curPoint .y ))
180181 return ", " .join (textList )
181182
182- def _get_boundingRects (self ):
183+ def _get_boundingRects (self ) -> List [ locationHelper . RectLTWH ] :
183184 if self .isCollapsed :
184185 return []
185186 startOffset = self ._startOffset
@@ -235,12 +236,11 @@ def _get_boundingRects(self):
235236 )
236237 offset = inclusiveLineEnd + 1
237238 else :
238- if isinstance ( startLocation , locationHelper . Point ):
239- rects . append (
240- locationHelper . RectLTWH . fromPoint ( startLocation )
239+ rects . append (
240+ locationHelper . RectLTWH . fromCollection (
241+ startLocation
241242 )
242- else :
243- rects .append (startLocation )
243+ )
244244 intersectedRects = []
245245 for rect in rects :
246246 intersection = rect .intersection (objLocation )
You can’t perform that action at this time.
0 commit comments