Add extra row count for header, drop prints

history_view
Tyler Goodlet 2022-09-12 15:37:16 -04:00
parent 4f15ce346b
commit b3fcc25e21
1 changed files with 2 additions and 7 deletions

View File

@ -176,7 +176,7 @@ class CompleterView(QTreeView):
# compute the approx height in pixels needed to include # compute the approx height in pixels needed to include
# all result rows in view. # all result rows in view.
row_h = rows_h = self.rowHeight(cidx) * rows row_h = rows_h = self.rowHeight(cidx) * (rows + 1)
for idx, item in self.iter_df_rows(): for idx, item in self.iter_df_rows():
row_h = self.rowHeight(idx) row_h = self.rowHeight(idx)
rows_h += row_h rows_h += row_h
@ -199,7 +199,6 @@ class CompleterView(QTreeView):
self.resizeColumnToContents(i) self.resizeColumnToContents(i)
col_w_tot += self.columnWidth(i) col_w_tot += self.columnWidth(i)
# NOTE: if the heigh `h` set here is **too large** then the # NOTE: if the heigh `h` set here is **too large** then the
# resize event will perpetually trigger as the window causes # resize event will perpetually trigger as the window causes
# some kind of recompute of callbacks.. so we have to ensure # some kind of recompute of callbacks.. so we have to ensure
@ -541,9 +540,7 @@ class SearchWidget(QtWidgets.QWidget):
# size it as we specify # size it as we specify
self.setSizePolicy( self.setSizePolicy(
# QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed,
# QtWidgets.QSizePolicy.Expanding,
QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed,
) )
@ -608,7 +605,6 @@ class SearchWidget(QtWidgets.QWidget):
''' '''
godw = self.godwidget godw = self.godwidget
print('showing cache only')
self.view.set_section_entries( self.view.set_section_entries(
'cache', 'cache',
list(reversed(godw._chart_cache)), list(reversed(godw._chart_cache)),
@ -694,7 +690,6 @@ class SearchWidget(QtWidgets.QWidget):
) )
self.show_only_cache_entries() self.show_only_cache_entries()
# self.focus()
self.bar.focus() self.bar.focus()
return fqsn return fqsn
@ -827,7 +822,7 @@ async def fill_results(
pattern = await recv_chan.receive() pattern = await recv_chan.receive()
period = time.time() - wait_start period = time.time() - wait_start
print(f'{pattern} after {period}') log.debug(f'{pattern} after {period}')
# during fast multiple key inputs, wait until a pause # during fast multiple key inputs, wait until a pause
# (in typing) to initiate search # (in typing) to initiate search