Fix a bug with categories (again)
Disable interface during mass update (cursor not changed :() Resize search icon
This commit is contained in:
parent
16e90b8fc0
commit
5451d3c4ce
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1047,6 +1047,7 @@ bool Database::LoadCategory(const wxString& id, const wxString& name, Category&
|
||||||
category.backcolor = wxColour(set.GetAsString(wxT("backcolor")));
|
category.backcolor = wxColour(set.GetAsString(wxT("backcolor")));
|
||||||
category.forecolor = wxColour(set.GetAsString(wxT("forecolor")));
|
category.forecolor = wxColour(set.GetAsString(wxT("forecolor")));
|
||||||
category.font = set.GetAsString(wxT("font"));
|
category.font = set.GetAsString(wxT("font"));
|
||||||
|
category.fix_cost = set.GetBool(wxT("fix_cost"));
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ wxString User::GetCategoryId(const wxString& catName)
|
||||||
Category cat;
|
Category cat;
|
||||||
|
|
||||||
for (it=_categories.begin(); it !=_categories.end(); it++)
|
for (it=_categories.begin(); it !=_categories.end(); it++)
|
||||||
if (it->name == catName)
|
if (wxGetTranslation(it->name) == catName)
|
||||||
return it->id;
|
return it->id;
|
||||||
|
|
||||||
if ( _db->LoadCategory(wxT(""), catName, cat))
|
if ( _db->LoadCategory(wxT(""), catName, cat))
|
||||||
|
|
|
@ -25,14 +25,14 @@
|
||||||
SetCellTextColour(row, i, forecolor); \
|
SetCellTextColour(row, i, forecolor); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SET_ROW_FONT(row, font) for(int i=0; i<NUMBER_COLS_OPS; i++) \
|
#define SET_ROW_FONT(row, font) for(int i=0; i<NUMBER_COLS_OPS; i++) \
|
||||||
{ \
|
{ \
|
||||||
SetCellFont(row, i, font); \
|
SetCellFont(row, i, font); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UNESCAPE_CHARS(s) { \
|
#define UNESCAPE_CHARS(s) { \
|
||||||
s.Replace(wxT("\\\""), wxT("\""), true); \
|
s.Replace(wxT("\\\""), wxT("\""), true); \
|
||||||
s.Replace(wxT("\\\'"), wxT("\'"), true); \
|
s.Replace(wxT("\\\'"), wxT("\'"), true); \
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(GridAccount, wxGrid)
|
BEGIN_EVENT_TABLE(GridAccount, wxGrid)
|
||||||
|
@ -1492,6 +1492,12 @@ void GridAccount::MassUpdate(std::vector<int>& rows, updateOperationFunc func, v
|
||||||
std::vector<Operation>::iterator it;
|
std::vector<Operation>::iterator it;
|
||||||
Operation op, op2;
|
Operation op, op2;
|
||||||
|
|
||||||
|
_parent->Disable();
|
||||||
|
|
||||||
|
_parent->SetCursor(wxCursor(wxCURSOR_ARROWWAIT));
|
||||||
|
|
||||||
|
_parent->Update();
|
||||||
|
|
||||||
if (rows.size())
|
if (rows.size())
|
||||||
{
|
{
|
||||||
for(i=0; i<(int)rows.size(); i++)
|
for(i=0; i<(int)rows.size(); i++)
|
||||||
|
@ -1527,4 +1533,8 @@ void GridAccount::MassUpdate(std::vector<int>& rows, updateOperationFunc func, v
|
||||||
LoadOperations(_operations, false, false, 0, 0);
|
LoadOperations(_operations, false, false, 0, 0);
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
|
_parent->Enable();
|
||||||
|
|
||||||
|
_parent->SetCursor(wxNullCursor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user