summaryrefslogtreecommitdiff
path: root/src/gui/windows/mailwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/mailwindow.cpp')
-rw-r--r--src/gui/windows/mailwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index e9933b307..ef6444405 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -109,7 +109,8 @@ void MailWindow::action(const ActionEvent &event)
}
else if (eventId == "new")
{
- new MailEdit();
+ if (!mailEditWindow)
+ mailEditWindow = new MailEdit();
}
else if (eventId == "open")
{
@@ -124,6 +125,7 @@ void MailWindow::action(const ActionEvent &event)
void MailWindow::clear()
{
delete_all(mMessages);
+ mMessages.clear();
mMailModel->clear();
mListBox->setSelected(-1);
}