mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better pin view detection in delegates
This commit is contained in:
parent
53e1398ed6
commit
2bd105d8b9
@ -65,7 +65,13 @@ class UpdateEditorGeometry(object):
|
|||||||
|
|
||||||
# Compute the maximum we can show if we consume the entire viewport
|
# Compute the maximum we can show if we consume the entire viewport
|
||||||
pin_view = self.table_widget.pin_view
|
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()
|
max_width = pin_view.horizontalScrollBar().geometry().width()
|
||||||
else:
|
else:
|
||||||
view = self.table_widget
|
view = self.table_widget
|
||||||
|
Loading…
x
Reference in New Issue
Block a user