URI: 
       tuse update instead of repaint; do not update qr window if not visible - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 1fec0887d2f6d4a98c0712862d6e5370caa331e4
   DIR parent fadeb913d076a39a2c41fc9a7a0451626f886003
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Wed, 28 Nov 2012 21:07:35 +0100
       
       use update instead of repaint; do not update qr window if not visible
       
       Diffstat:
         M lib/gui_qt.py                       |       8 +++-----
       
       1 file changed, 3 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/lib/gui_qt.py b/lib/gui_qt.py
       t@@ -145,7 +145,7 @@ class QRCodeWidget(QWidget):
            def set_addr(self, addr):
                self.addr = addr
                self.qr = pyqrnative.QRCode(4, pyqrnative.QRErrorCorrectLevel.L)
       -        self.qr.addData(addr)
       +        self.qr.addData(self.addr)
                self.qr.make()
                
            def paintEvent(self, e):
       t@@ -222,9 +222,7 @@ class QR_Window(QWidget):
                self.label = label
                label_text = "<span style='font-size: 21pt'>%s</span>" % label if label else ""
                self.label_label.setText(label_text)
       -        self.update()
        
       -    def update(self):
                msg = 'bitcoin:'+self.address
                if self.amount is not None:
                    msg += '?amount=%s'%(str( Decimal(self.amount) /100000000))
       t@@ -234,7 +232,7 @@ class QR_Window(QWidget):
                    msg += '?label=%s'%(self.label)
                    
                self.qrw.set_addr( msg )
       -        self.qrw.repaint()
       +        self.qrw.update()
        
                    
        
       t@@ -493,7 +491,7 @@ class ElectrumWindow(QMainWindow):
        
            def recv_changed(self, a):
                "current item changed"
       -        if a is not None and self.qr_window:
       +        if a is not None and self.qr_window and self.qr_window.isVisible():
                    address = str(a.text(1))
                    label = self.wallet.labels.get(address)
                    amount = self.wallet.requested_amounts.get(address)