Better pin view detection in delegates

This commit is contained in:
Kovid Goyal 2018-02-12 09:48:12 +05:30
parent 53e1398ed6
commit 2bd105d8b9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -65,7 +65,13 @@ class UpdateEditorGeometry(object):
# Compute the maximum we can show if we consume the entire viewport
pin_view = self.table_widget.pin_view
if pin_view.isVisible() and pin_view.geometry().x() <= initial_geometry.x():
is_pin_view, p = False, editor.parent()
while p is not None:
if p is pin_view:
is_pin_view = True
break
p = p.parent()
if is_pin_view:
max_width = pin_view.horizontalScrollBar().geometry().width()
else:
view = self.table_widget