Skip to content

Commit

Permalink
bugfix: order of init of mainwindow
Browse files Browse the repository at this point in the history
resize event refers to pypad_text_edit
  • Loading branch information
idanpa committed Jan 19, 2025
1 parent 2071b98 commit 569e34c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,10 @@ def closeEvent(self, event: QCloseEvent):
class MainWindow(QMainWindow):
def __init__(self, **kwargs):
super().__init__()
self.setWindowTitle('pypad')
self.resize(1100, 600)
self.pypad_text_edit = PyPadTextEdit(self, **kwargs)
self.setCentralWidget(self.pypad_text_edit)
self.setWindowTitle('pypad')
self.resize(1100, 600)

def resizeEvent(self, e: QResizeEvent):
# QTextEdit's resizeEvent fires also upon text overflow in cells
Expand Down

0 comments on commit 569e34c

Please sign in to comment.