summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mainwindow.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 7bf4116..9436f41 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -239,15 +239,17 @@ void MainWindow::closeEvent(QCloseEvent *event)
return;
}
- if(isStored || MessageBox::critical(this,
- tr("Discard"),
- tr("This session will "
- "<strong>NOT</strong> be stored in "
- "the journal.<br/>"
- "Are you sure you want to continue?"),
- MessageBox::Yes | MessageBox::No)
- == MessageBox::Yes) {
- if(!isStored) {
+ if(netcom.sessionid == "" ||
+ isStored ||
+ MessageBox::critical(this,
+ tr("Discard"),
+ tr("This session will "
+ "<strong>NOT</strong> be stored in "
+ "the journal.<br/>"
+ "Are you sure you want to continue?"),
+ MessageBox::Yes | MessageBox::No) == MessageBox::Yes)
+ {
+ if(netcom.sessionid != "" && !isStored) {
netcom.discard();
// isStored = true;
closing = true;