summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mainwindow.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 4cb721f..2345644 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -170,7 +170,7 @@ void MainWindow::closeCommit()
return;
}
netcom.commit();
- isStored = true;
+ // isStored = true;
closing = true;
}
@@ -182,7 +182,7 @@ void MainWindow::closeNoCommit()
return;
}
netcom.nocommit();
- isStored = true;
+ // isStored = true;
closing = true;
}
@@ -204,7 +204,7 @@ void MainWindow::closeDiscard()
if(res == MessageBox::Yes) {
netcom.discard();
- isStored = true;
+ // isStored = true;
closing = true;
}
}
@@ -227,7 +227,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
== MessageBox::Yes) {
if(!isStored) {
netcom.discard();
- isStored = true;
+ // isStored = true;
closing = true;
event->ignore();
return;
@@ -388,8 +388,6 @@ void MainWindow::setTemplate(QString name)
void MainWindow::handle(QDomDocument &doc)
{
- if(closing) close();
-
DEBUG(mainwindow, "Handle %s\n",
doc.toString().toStdString().c_str());
@@ -400,6 +398,7 @@ void MainWindow::handle(QDomDocument &doc)
if(element.tagName() == "error") {
showError("Pracro Server Error", element.text());
+ closing = false;
continue;
}
@@ -430,4 +429,9 @@ void MainWindow::handle(QDomDocument &doc)
}
}
+
+ if(closing) {
+ isStored = true;
+ close();
+ }
}