Warn user when some operation dates are modified due to month restriction

This commit is contained in:
2014-02-08 15:14:04 +01:00
parent 34bbd08de6
commit 2cea83f22b
7 changed files with 378 additions and 432 deletions

View File

@@ -18,6 +18,7 @@
*/
#include "GenerateDialog.hpp"
#include <QLabel>
#include <QMessageBox>
GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int year) : QDialog(0, Qt::Dialog), _kiss(kiss), _wxUI(parent)
{
@@ -210,7 +211,9 @@ void GenerateDialog::OnOK()
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
close();
_kiss->GenerateMonth(monthFrom, yearFrom, monthTo, yearTo);
if (_kiss->GenerateMonth(monthFrom, yearFrom, monthTo, yearTo))
QMessageBox::warning(0, _("Warning"), _("Some operations date has been updated"));
QApplication::restoreOverrideCursor();
}