diff options
-rw-r--r-- | src/up-history.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/up-history.c b/src/up-history.c index 9f46017..fdeb14c 100644 --- a/src/up-history.c +++ b/src/up-history.c @@ -155,11 +155,11 @@ up_history_array_limit_resolution (GPtrArray *array, guint max_num) guint64 preset; item = (UpHistoryItem *) g_ptr_array_index (array, i); - preset = last + ((first - last) * (guint64) step) / max_num; + preset = first - ((first - last) * (guint64) step) / max_num; /* if state changed or we went over the preset do a new point */ if (count > 0 && - (up_history_item_get_time (item) > preset || + (up_history_item_get_time (item) < preset || up_history_item_get_state (item) != state)) { item_new = up_history_item_new (); up_history_item_set_time (item_new, time_s / count); |