From 3538f237e4bfadf41418ba08bd798be52604455f Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 13 Sep 2006 15:49:22 +0000 Subject: [PATCH] patch Christian's patch. CCMAIL: cza@sixxac.com svn path=/branches/KDE/3.5/kdepim/; revision=583814 --- kmreadermainwin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kmreadermainwin.cpp b/kmreadermainwin.cpp index 0fca80a5c..6bbd58e8a 100644 --- a/kmreadermainwin.cpp +++ b/kmreadermainwin.cpp @@ -130,15 +130,17 @@ void KMReaderMainWin::slotTrashMsg() KMFolder* parent; int index; KMMsgDict::instance()->getLocation( mMsg->getMsgSerNum(), &parent, &index ); - if (parent) { + if ( parent && !parent->isTrash() ) { + // open the folder (ref counted) + parent->open(); KMMessage *msg = parent->getMsg( index ); if (msg) { - // now delete the msg and close this window KMDeleteMsgCommand *command = new KMDeleteMsgCommand( parent, msg ); command->start(); - close(); } + parent->close(); } + close(); } //-----------------------------------------------------------------------------