fix coordinate mapping for cell padding hit-test in grid
This commit is contained in:
parent
a1ea2b8727
commit
9c42b4fdd7
@ -571,7 +571,8 @@ class ThumbnailGrid(QScrollArea):
|
||||
# Empty space: flow layout, viewport, or cell padding (missed pixmap)
|
||||
is_empty = child is self.widget() or child is self.viewport()
|
||||
if not is_empty and isinstance(child, ThumbnailWidget):
|
||||
local = child.mapFromParent(self.widget().mapFromParent(event.position().toPoint()))
|
||||
global_pos = self.mapToGlobal(event.position().toPoint())
|
||||
local = child.mapFromGlobal(global_pos)
|
||||
if not child._hit_pixmap(local):
|
||||
is_empty = True
|
||||
if is_empty:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user