Close the print dialog after a sucessfull print

I think it's intuitive to do not warn if everything was according to the
plan, and keep the dialog open after a print was due is something that I
find it strange.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-07-17 21:25:57 -03:00 committed by Dirk Hohndel
parent 7a70f15f9b
commit 10ed5da325

View file

@ -75,8 +75,10 @@ void PrintDialog::previewClicked(void)
void PrintDialog::printClicked(void)
{
QPrintDialog printDialog(&printer, this);
if (printDialog.exec() == QDialog::Accepted)
if (printDialog.exec() == QDialog::Accepted){
printLayout->print();
close();
}
}
void PrintDialog::onPaintRequested(QPrinter *printerPtr)