Disable interface when generating month

Fix a bug in generate month
This commit is contained in:
Grégory Soutadé 2011-10-31 10:39:46 +01:00
parent 6c0c04cad5
commit 29c1f6b9ba
2 changed files with 6 additions and 1 deletions

View File

@ -910,8 +910,11 @@ void AccountPanel::OnMenuGenerate()
month = _curMonth;
}
_wxUI->setEnabled(false);
GenerateDialog g(_kiss, _wxUI, month, year);
g.setModal(true);
g.exec();
_wxUI->setEnabled(true);
}
void AccountPanel::OnMenuDelete()

View File

@ -95,7 +95,7 @@ GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int yea
if (year == -1)
{
_yearTo->setCurrentIndex(9);
_yearTo->setCurrentIndex(10);
_monthTo->setCurrentIndex(curDate.month());
}
else
@ -208,8 +208,10 @@ void GenerateDialog::OnOK()
}
yearTo = _yearTo->itemText(_yearTo->currentIndex()).toInt();
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
close();
_kiss->GenerateMonth(monthFrom, yearFrom, monthTo, yearTo);
QApplication::restoreOverrideCursor();
}
void GenerateDialog::OnCancel()