-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.h | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index c410829..2b5870a 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -158,10 +158,8 @@ void MainWindow::refreshMailView(QList<RecMail>*list) } void MainWindow::displayMail(QListViewItem*item) { - m_currentItem = item; - if (!item) return; RecMail mail = ((MailListViewItem*)item)->data(); RecBody body = folderView->fetchBody(mail); @@ -179,10 +177,10 @@ void MainWindow::displayMail(QListViewItem*item) } void MainWindow::slotDeleteMail() { - if (!m_currentItem) return; - RecMail mail = ((MailListViewItem*)m_currentItem)->data(); + if (!mailView->currentItem()) return; + RecMail mail = ((MailListViewItem*)mailView->currentItem() )->data(); mail.Wrapper()->deleteMail( mail ); folderView->refreshCurrent(); } diff --git a/noncore/net/mail/mainwindow.h b/noncore/net/mail/mainwindow.h index 8641510..21af190 100644 --- a/noncore/net/mail/mainwindow.h +++ b/noncore/net/mail/mainwindow.h @@ -36,9 +36,8 @@ protected: QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, *editSettings, *editAccounts, *syncFolders; AccountView *folderView; QListView *mailView; - QListViewItem* m_currentItem; QBoxLayout *layout; }; #endif |