Fix two bugs : New date was not set in grid after operation validation and new group name was not saved
This commit is contained in:
parent
292591c098
commit
7bef9dd5b0
2
Makefile
2
Makefile
|
@ -59,7 +59,7 @@ clean:
|
|||
mojito : $(MOCS_OBJS) $(KDCHART_MOCS_OBJS)
|
||||
|
||||
kc: $(MOCS) $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) #-L. -lkdchart
|
||||
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
|
||||
|
||||
$(UI_CHARTSELECTOR): libkdchart/src/KDChartDatasetSelector.ui
|
||||
uic $< > $(UI_CHARTSELECTOR)
|
||||
|
|
|
@ -844,6 +844,7 @@ void GridAccount::OnOperationModified(int row, int col)
|
|||
QFont font;
|
||||
Category cat ;
|
||||
bool fix_cost;
|
||||
QDate curDate = QDate::currentDate();
|
||||
|
||||
// Avoid recursives calls
|
||||
if (_inModification || _loadOperations) return;
|
||||
|
@ -999,7 +1000,12 @@ void GridAccount::OnOperationModified(int row, int col)
|
|||
if (fix_cost && i == CATEGORY) continue;
|
||||
setItem(row, i, new QTableWidgetItem(""));
|
||||
}
|
||||
|
||||
if (!fix_cost)
|
||||
{
|
||||
if (_curMonth+1 == curDate.month() &&
|
||||
_curYear == curDate.year())
|
||||
setItem(row, OP_DATE, new QTableWidgetItem(v.sprintf("%02d/%02d/%d", curDate.day(), _curMonth+1, _curYear)));
|
||||
}
|
||||
DEFAULT_FONT(font);
|
||||
|
||||
if (fix_cost)
|
||||
|
@ -1176,7 +1182,8 @@ void GridAccount::UpdateMeta(Operation& meta)
|
|||
|
||||
meta.amount = _kiss->MetaAmount(meta.id);
|
||||
|
||||
UpdateOperation(meta);
|
||||
if (_databaseSynchronization)
|
||||
_kiss->UpdateOperation(meta);
|
||||
}
|
||||
|
||||
void GridAccount::Group()
|
||||
|
|
Loading…
Reference in New Issue
Block a user