From 01036e45403ba1825f63bd3c4a669f79fb363686 Mon Sep 17 00:00:00 2001 From: Megan Conners Date: Sun, 16 Jan 2022 12:31:16 -0500 Subject: [PATCH] fixes #992 and #998 with explicit int casts --- manuskript/ui/views/corkDelegate.py | 2 +- manuskript/ui/views/textEditView.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manuskript/ui/views/corkDelegate.py b/manuskript/ui/views/corkDelegate.py index 5ce92574..fc63c28e 100644 --- a/manuskript/ui/views/corkDelegate.py +++ b/manuskript/ui/views/corkDelegate.py @@ -488,7 +488,7 @@ class corkDelegate(QStyledItemDelegate): fullSummary = item.data(Outline.summaryFull) if lineSummary or not fullSummary: m = self.margin - r = self.mainLineRect.adjusted(-m, -m, m, m / 2) + r = self.mainLineRect.adjusted(-m, -m, m, int(m / 2)) p.save() p.setPen(Qt.NoPen) p.setBrush(QColor("#EEE")) diff --git a/manuskript/ui/views/textEditView.py b/manuskript/ui/views/textEditView.py index 0c5a7121..b26a20c2 100644 --- a/manuskript/ui/views/textEditView.py +++ b/manuskript/ui/views/textEditView.py @@ -369,7 +369,7 @@ class textEditView(QTextEdit): opt = settings.textEditor docHeight = self.document().size().height() + 2 * opt["marginsTB"] if self.heightMin <= docHeight <= self.heightMax: - self.setMinimumHeight(docHeight) + self.setMinimumHeight(int(docHeight)) def setAutoResize(self, val): self._autoResize = val