mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Datafile: Added ::commit, dependent on _dirty flag
This commit is contained in:
parent
fb6b33cd7d
commit
2d0051d696
2 changed files with 18 additions and 1 deletions
|
@ -49,16 +49,30 @@ Interval Datafile::getLatestInterval () const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Datafile::addExclusion (const std::string& exclusion)
|
||||
{
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Datafile::addInterval (const Interval& interval)
|
||||
{
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Datafile::modifyInterval (const Interval& interval)
|
||||
{
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Datafile::commit ()
|
||||
{
|
||||
if (_dirty)
|
||||
{
|
||||
|
||||
|
||||
_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue