src/eric7/EricGraphics/EricGraphicsView.py

branch
eric7
changeset 10373
093dcebe5ecb
parent 9653
e67609152c5e
child 10423
299802979277
equal deleted inserted replaced
10372:1444b4bee64b 10373:093dcebe5ecb
252 """ 252 """
253 startx = sys.maxsize 253 startx = sys.maxsize
254 starty = sys.maxsize 254 starty = sys.maxsize
255 endx = 0 255 endx = 0
256 endy = 0 256 endy = 0
257 items = self.filteredItems(list(self.scene().items())) 257 for itm in self.filteredItems(self.scene().items()):
258 for itm in items:
259 rect = itm.sceneBoundingRect() 258 rect = itm.sceneBoundingRect()
260 itmEndX = rect.x() + rect.width() 259 itmEndX = rect.x() + rect.width()
261 itmEndY = rect.y() + rect.height() 260 itmEndY = rect.y() + rect.height()
262 itmStartX = rect.x() 261 itmStartX = rect.x()
263 itmStartY = rect.y() 262 itmStartY = rect.y()
284 @param border border width to include in the calculation (integer) 283 @param border border width to include in the calculation (integer)
285 @return the minimum size (QSizeF) 284 @return the minimum size (QSizeF)
286 """ 285 """
287 endx = 0 286 endx = 0
288 endy = 0 287 endy = 0
289 items = self.filteredItems(list(self.scene().items())) 288 for itm in self.filteredItems(self.scene().items()):
290 for itm in items:
291 rect = itm.sceneBoundingRect() 289 rect = itm.sceneBoundingRect()
292 itmEndX = rect.x() + rect.width() 290 itmEndX = rect.x() + rect.width()
293 itmEndY = rect.y() + rect.height() 291 itmEndY = rect.y() + rect.height()
294 if endx <= itmEndX: 292 if endx <= itmEndX:
295 endx = itmEndX 293 endx = itmEndX
436 @param items list of items as returned by the scene object 434 @param items list of items as returned by the scene object
437 (QGraphicsItem) 435 (QGraphicsItem)
438 @return list of interesting collision items (QGraphicsItem) 436 @return list of interesting collision items (QGraphicsItem)
439 """ 437 """
440 # just return the list unchanged 438 # just return the list unchanged
441 return items 439 return list(items)

eric ide

mercurial