diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp index 492bc630a3f..eaf9d2acf19 100644 --- a/mozilla/mailnews/base/src/nsMsgDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp @@ -5061,9 +5061,12 @@ NS_IMETHODIMP nsMsgDBView::NavigateStatus(nsMsgNavigationTypeValue motion, PRBoo PRBool enable = PR_FALSE; nsresult rv = NS_ERROR_FAILURE; nsMsgKey resultKey = nsMsgKey_None; - PRInt32 index; + PRInt32 index = nsMsgKey_None; nsMsgViewIndex resultIndex = nsMsgViewIndex_None; - rv = mTreeSelection->GetCurrentIndex(&index); + if (mTreeSelection) + (void) mTreeSelection->GetCurrentIndex(&index); + else + index = FindViewIndex(m_currentlyDisplayedMsgKey); // warning - we no longer validate index up front because fe passes in -1 for no // selection, so if you use index, be sure to validate it before using it @@ -5786,6 +5789,8 @@ nsresult nsMsgDBView::CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMess NS_ENSURE_ARG_POINTER(aNewMsgDBView); aNewMsgDBView->mMsgWindow = aMsgWindow; + if (aMsgWindow) + aMsgWindow->SetOpenFolder(m_viewFolder? m_viewFolder : m_folder); aNewMsgDBView->mMessengerInstance = aMessengerInstance; aNewMsgDBView->mCommandUpdater = aCmdUpdater; aNewMsgDBView->m_folder = m_folder; diff --git a/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp b/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp index 61535b2effa..92b1994a679 100755 --- a/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp @@ -118,7 +118,7 @@ nsMsgXFVirtualFolderDBView::CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger newMsgDBView->m_viewFolder = m_viewFolder; newMsgDBView->m_numUnread = m_numUnread; newMsgDBView->m_numTotal = m_numTotal; - + newMsgDBView->m_searchSession = m_searchSession; return NS_OK; } diff --git a/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.h b/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.h index 250c2861dde..f9daee2f127 100755 --- a/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.h +++ b/mozilla/mailnews/base/src/nsMsgXFVirtualFolderDBView.h @@ -73,7 +73,6 @@ public: protected: - nsCOMPtr m_viewFolder; PRUint32 m_cachedFolderArrayIndex; // array index of next folder with cached hits to deal with. nsCOMArray m_foldersWithNonVerifiedCachedHits; nsCOMArray m_hdrHits;