mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Extract creation of intervals into IntervalFactory
This commit is contained in:
parent
8008cd8312
commit
1a24c49507
9 changed files with 190 additions and 110 deletions
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2016, 2018, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -28,11 +28,12 @@
|
|||
#include <timew.h>
|
||||
#include <iostream>
|
||||
#include <format.h>
|
||||
#include <IntervalFactory.h>
|
||||
|
||||
static void undoIntervalAction(UndoAction& action, Database& database)
|
||||
{
|
||||
Interval before = Interval::fromJson (action.getBefore ());
|
||||
Interval after = Interval::fromJson (action.getAfter ());
|
||||
Interval before = IntervalFactory::fromJson (action.getBefore ());
|
||||
Interval after = IntervalFactory::fromJson (action.getAfter ());
|
||||
|
||||
database.modifyInterval (after, before, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue