Ignore resize events with the same height (for now)

history_view
Tyler Goodlet 2022-09-09 22:07:51 -04:00
parent d11dc787a1
commit d5f0c59b57
1 changed files with 25 additions and 3 deletions

View File

@ -158,7 +158,7 @@ class MainWindow(QtGui.QMainWindow):
# XXX: for tiling wms this should scale # XXX: for tiling wms this should scale
# with the alloted window size. # with the alloted window size.
# TODO: detect for tiling and if untrue set some size? # TODO: detect for tiling and if untrue set some size?
size = (300, 500) # size = (300, 500)
godwidget: GodWidget godwidget: GodWidget
title = 'piker chart (ur symbol is loading bby)' title = 'piker chart (ur symbol is loading bby)'
@ -303,9 +303,31 @@ class MainWindow(QtGui.QMainWindow):
self.resize(*size or self._size) self.resize(*size or self._size)
def resizeEvent(self, event: QtCore.QEvent) -> None: def resizeEvent(self, event: QtCore.QEvent) -> None:
print('window resize') if (
# self.godwidget.resizeEvent(event) # event.spontaneous()
event.oldSize().height == event.size().height
):
event.ignore()
return
# XXX: uncomment for debugging..
# attrs = {}
# for key in dir(event):
# if key == '__dir__':
# continue
# attr = getattr(event, key)
# try:
# attrs[key] = attr()
# except TypeError:
# attrs[key] = attr
# from pprint import pformat
# print(
# f'{pformat(attrs)}\n'
# f'WINDOW RESIZE: {self.size()}\n\n'
# )
self.godwidget.on_win_resize(event) self.godwidget.on_win_resize(event)
event.accept()
# singleton app per actor # singleton app per actor