summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r--client/mainwindow.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 9e62e5d..756f759 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -172,7 +172,7 @@ void MainWindow::closeCommit()
return;
}
netcom.commit();
- isStored = true;
+ // isStored = true;
closing = true;
}
@@ -186,7 +186,7 @@ void MainWindow::closeNoCommit()
return;
}
netcom.nocommit();
- isStored = true;
+ // isStored = true;
closing = true;
}
@@ -210,7 +210,7 @@ void MainWindow::closeDiscard()
if(res == MessageBox::Yes) {
netcom.discard();
- isStored = true;
+ // isStored = true;
closing = true;
}
}
@@ -233,7 +233,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
== MessageBox::Yes) {
if(!isStored) {
netcom.discard();
- isStored = true;
+ // isStored = true;
closing = true;
event->ignore();
return;
@@ -343,6 +343,9 @@ void MainWindow::updateMacros(QDomNodeList &nodes)
break;
}
}
+
+ QVBoxLayout *l = (QVBoxLayout*)central->layout();
+ l->addStretch(1);
}
}
@@ -391,8 +394,6 @@ void MainWindow::setTemplate(QString name)
void MainWindow::handle(QDomDocument &doc)
{
- if(closing) close();
-
DEBUG(mainwindow, "Handle %s\n",
doc.toString().toStdString().c_str());
@@ -403,6 +404,7 @@ void MainWindow::handle(QDomDocument &doc)
if(element.tagName() == "error") {
showError("Pracro Server Error", element.text());
+ closing = false;
continue;
}
@@ -433,4 +435,9 @@ void MainWindow::handle(QDomDocument &doc)
}
}
+
+ if(closing) {
+ isStored = true;
+ close();
+ }
}