[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/pim/mailody/src
From:       Tom Albers <tomalbers () kde ! nl>
Date:       2007-01-30 23:07:44
Message-ID: 1170198464.162384.29689.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 628697 by toma:

Fixed irritating bug (and very hard to find). When selecting another message, the \
previous message was redrawn first, this is caused because we set the external images \
to false before showing a new message, but that actually triggers to redraw the \
previous message without external images, even though it is no longer selected.


 M  +4 -1      mainwindow.cpp  
 M  +2 -2      messageview.cpp  
 M  +3 -1      messageview.h  


--- trunk/playground/pim/mailody/src/mainwindow.cpp #628696:628697
@@ -1118,7 +1118,10 @@
 
     // Disable loading of external images.
     m_externalImageAction->setChecked(false);
-    slotToggleExternalImage();
+    TotalView* tv = static_cast<TotalView*>(m_tabWidget->currentPage());
+    if (tv)
+        tv->body()->setExternalImage( false,
+                                      false /* no redraw of the old msg */ );
 
     TotalView* tb = static_cast<TotalView*>(m_tabWidget->currentPage());
     tb->setMsg(headerItem->msg());
--- trunk/playground/pim/mailody/src/messageview.cpp #628696:628697
@@ -547,13 +547,13 @@
     }
 }
 
-void MessageView::setExternalImage( bool i )
+void MessageView::setExternalImage( bool i, bool screenupdate )
 {
     m_externalImage = i;
     setOnlyLocalReferences(!i);
 
     // there is no update() call afaik
-    if (m_currentMessage)
+    if (m_currentMessage && screenupdate)
     {
         begin();
         write(m_currentMessage->body());
--- trunk/playground/pim/mailody/src/messageview.h #628696:628697
@@ -198,8 +198,10 @@
 
         /**
          * set @p i to true to load external images in the message
+         * it will update the message immediatly, unless @p updateScreen
+         * is set to false.
          */
-        void setExternalImage( bool i );
+        void setExternalImage( bool i, bool updateScreen=true );
 
         /**
          * set this so the links will open directly, normaly it would


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic