Fix bug in GenerateDialog that always display error message

This commit is contained in:
Grégory Soutadé 2021-10-03 12:35:17 +02:00
parent 094b017aa1
commit 259b163b11
1 changed files with 4 additions and 3 deletions

View File

@ -54,9 +54,6 @@ GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int yea
connect(_ok, SIGNAL(clicked()), this, SLOT(OnOK()));
connect(cancel, SIGNAL(clicked()), this, SLOT(OnCancel()));
connect(_yearTo, SIGNAL(currentIndexChanged(int)), this, SLOT(OnYearToChange(int)));
connect(_yearFrom, SIGNAL(currentIndexChanged(int)), this, SLOT(OnYearFromChange(int)));
_ops = _kiss->GetAllOperations();
/* From */
@ -67,6 +64,8 @@ GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int yea
toSelect = i;
}
connect(_yearFrom, SIGNAL(currentIndexChanged(int)), this, SLOT(OnYearFromChange(int)));
if (toSelect != -1)
{
_yearFrom->setCurrentIndex(toSelect);
@ -93,6 +92,8 @@ GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int yea
for(i=year-10; i<=year+10; i++)
_yearTo->addItem(QString::number(i));
connect(_yearTo, SIGNAL(currentIndexChanged(int)), this, SLOT(OnYearToChange(int)));
if (year == -1)
{
_yearTo->setCurrentIndex(10);