tqt paytoedit: better height adjustment - electrum - Electrum Bitcoin wallet
 (HTM) git clone https://git.parazyd.org/electrum
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
 (DIR) commit aac9826e1b2a155a1c380f37b93fa6b505232818
 (DIR) parent 7278953c636caa91df53f1c686eac5eb25d0e1f8
 (HTM) Author: SomberNight <somber.night@protonmail.com>
       Date:   Sat,  4 May 2019 04:39:59 +0200
       
       qt paytoedit: better height adjustment
       
       was sometimes weird...
       e.g. pasting several lines of outputs would leave the textedit single line
       
       Diffstat:
         M electrum/gui/qt/paytoedit.py        |       6 +++---
       
       1 file changed, 3 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/electrum/gui/qt/paytoedit.py b/electrum/gui/qt/paytoedit.py
       t@@ -196,9 +196,9 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
                lineHeight = QFontMetrics(self.document().defaultFont()).height()
                docHeight = self.document().size().height()
                h = docHeight * lineHeight + 11
       -        if self.heightMin <= h <= self.heightMax:
       -            self.setMinimumHeight(h)
       -            self.setMaximumHeight(h)
       +        h = min(max(h, self.heightMin), self.heightMax)
       +        self.setMinimumHeight(h)
       +        self.setMaximumHeight(h)
                self.verticalScrollBar().hide()
        
            def qr_input(self):