Fix two bugs (Upper case in database avoiding accents, and cat/account with the same name during modification into PreferencesPanel)
Updating translations
This commit is contained in:
@@ -318,6 +318,15 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
|
||||
_wxUI->NeedReload();
|
||||
return;
|
||||
}
|
||||
|
||||
if (user->GetAccountId(new_account.name) != new_account.id)
|
||||
{
|
||||
wxMessageBox(_("Account ")+new_account.name+_(" already exists"), _("Error"), wxICON_ERROR | wxOK );
|
||||
_accountsGrid->SetCellValue(row, ACCOUNT_NAME, user->_accounts[row].name);
|
||||
inModification = false;
|
||||
return ;
|
||||
}
|
||||
|
||||
_kiss->UpdateAccount(new_account);
|
||||
}
|
||||
// New account
|
||||
@@ -418,6 +427,15 @@ void PreferencesPanel::OnCategoryModified(wxGridEvent& event)
|
||||
inModification = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (user->GetCategoryId(new_cat.name) != new_cat.id)
|
||||
{
|
||||
wxMessageBox(_("Category ")+new_cat.name+_(" already exists"), _("Error"), wxICON_ERROR | wxOK );
|
||||
_categoriesGrid->SetCellValue(row, CATEGORY_NAME, user->_categories[row].name);
|
||||
inModification = false;
|
||||
return ;
|
||||
}
|
||||
|
||||
_kiss->UpdateCategory(new_cat);
|
||||
}
|
||||
// New category
|
||||
|
||||
Reference in New Issue
Block a user