diff --git a/src/controller/KissCount.cpp b/src/controller/KissCount.cpp index 1238033..451a0f0 100644 --- a/src/controller/KissCount.cpp +++ b/src/controller/KissCount.cpp @@ -286,6 +286,8 @@ void KissCount::NewUser(const wxString& name) cat.parent = wxT("0") ; cat.name = _("Other") ; cat.color = OWN_GREEN; AddCategory(cat); + SetOperationOrder(wxT("ASC")); + _db->GenerateMonth(_user, -1, -1, (int)curDate.GetMonth(), curDate.GetYear()); } diff --git a/src/model/Database.cpp b/src/model/Database.cpp index 3e9497b..438fffe 100644 --- a/src/model/Database.cpp +++ b/src/model/Database.cpp @@ -957,23 +957,6 @@ void Database::NewUser(const wxString& name) set.Finalize(); - req = wxT("SELECT * FROM default_preference"); - - EXECUTE_SQL_QUERY(req, set,); - - while (set.NextRow()) - { - req = wxT("INSERT INTO preference ('user', 'name', 'value') VALUES ('") ; - req += id + wxT("'"); - req += wxT(", '") + set.GetAsString(wxT("type")) + wxT("'"); - req += wxT(", '") + set.GetAsString(wxT("value")) + wxT("'"); - req += wxT(")"); - - EXECUTE_SQL_UPDATE(req, ); - } - - set.Finalize(); - return ; } diff --git a/src/view/UsersDialog.cpp b/src/view/UsersDialog.cpp index 574fc16..f4adfd7 100644 --- a/src/view/UsersDialog.cpp +++ b/src/view/UsersDialog.cpp @@ -71,6 +71,8 @@ UsersDialog::UsersDialog(KissCount* kiss, wxUI *parent) : wxDialog(&(*parent), - if (users_list.size() == 0) OnNewUser(event); + else + ShowModal(); } void UsersDialog::OnOK(wxCommandEvent& event) diff --git a/src/view/wxUI.cpp b/src/view/wxUI.cpp index 6983b3b..9d0c0fd 100644 --- a/src/view/wxUI.cpp +++ b/src/view/wxUI.cpp @@ -143,7 +143,6 @@ void wxUI::ShowPreferences() void wxUI::ChangeUser() { UsersDialog u(_kiss, this); - u.ShowModal(); } void wxUI::LoadUser()