Handle no-rows-yet case
parent
890ffc76cf
commit
86b1316691
|
@ -183,8 +183,11 @@ class CompleterView(QTreeView):
|
||||||
# TODO: probably make this more general / less hacky
|
# TODO: probably make this more general / less hacky
|
||||||
# we should figure out the exact number of rows to allow
|
# we should figure out the exact number of rows to allow
|
||||||
# inclusive of search bar and header "rows", in pixel terms.
|
# inclusive of search bar and header "rows", in pixel terms.
|
||||||
window_h = self.window().height()
|
if row_px > 0:
|
||||||
rows = ceil(window_h / row_px) - 2
|
window_h = self.window().height()
|
||||||
|
rows = ceil(window_h / row_px) - 2
|
||||||
|
else:
|
||||||
|
rows = 16
|
||||||
|
|
||||||
# TODO: the problem here is that this view widget is **not**
|
# TODO: the problem here is that this view widget is **not**
|
||||||
# resizing/scaling when the parent layout is adjusted, not sure
|
# resizing/scaling when the parent layout is adjusted, not sure
|
||||||
|
|
Loading…
Reference in New Issue