Skip to content

Commit 9cac227

Browse files
authored
Merge a5fc856 into 50cb4de
2 parents 50cb4de + a5fc856 commit 9cac227

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

source/textInfos/offsets.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
Optional,
2121
Tuple,
2222
Dict,
23+
List,
2324
)
2425
from 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)

0 commit comments

Comments
 (0)