summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-08-23 13:31:57 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2012-08-23 13:31:57 +0200
commit07694570b09524881d01df7c857cc8f471f1ad04 (patch)
tree8cae77df7bb081c1b7d37a587d11c765769d3643 /client/mainwindow.cc
parent05732251c115b3538879ca523c461572115c6526 (diff)
parent909c48a297d7f68b107fce7ad444c2165f749f42 (diff)
Merge branch 'master' of http://git.aasimon.org/public/pracro
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();
+ }
}