Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10214/src/gui

Modified Files:
        wxFolderView.cpp 
Log Message:
recover better when connection is lost during message threading

Index: wxFolderView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderView.cpp,v
retrieving revision 1.658
retrieving revision 1.659
diff -b -u -2 -r1.658 -r1.659
--- wxFolderView.cpp    8 Apr 2004 12:24:52 -0000       1.658
+++ wxFolderView.cpp    8 Apr 2004 13:29:08 -0000       1.659
@@ -2364,4 +2364,10 @@
 
       self->InvalidateCache();
+
+      if ( !m_headers->Count() )
+      {
+         // this probably menas that we lost the connection unexpectedly
+         return NULL;
+      }
    }
 
@@ -2731,7 +2737,8 @@
       m_FolderView->OnFocusChange(-1, UID_ILLEGAL);
    }
-   else
+   else // got valid focus, find its UID
    {
-      if ( m_headers->IsInCache(m_itemFocus) )
+      // check that the folder is still opened
+      if ( m_headers->Count() && m_headers->IsInCache(m_itemFocus) )
       {
          m_uidFocus = GetUIdFromIndex(m_itemFocus);



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to