Fixed time selection algorithm

This commit is contained in:
Markus Koch 2017-02-05 13:25:40 +01:00
parent ae87f0cfa1
commit b7e98db42b

View File

@ -63,8 +63,8 @@ static gboolean mainWindow_list_entry_visible(GtkTreeModel *model, GtkTreeIter *
gtk_tree_model_get(model, iter, COL_TIMESTAMP, &datetime, -1); gtk_tree_model_get(model, iter, COL_TIMESTAMP, &datetime, -1);
if (datetime) { if (datetime) {
time = g_date_time_to_unix(datetime); time = g_date_time_to_unix(datetime);
/* The addition/subtraction in braces allows for the whole day instead of just its first second. */ /* The addition in braces allows for the whole day instead of just its first second. */
return time >= (mainWindow->filterSettings.time_start - (60 * 60 * 23 + 60 * 59 + 59)) && return time >= (mainWindow->filterSettings.time_start) &&
time <= mainWindow->filterSettings.time_end + (60 * 60 * 23 + 60 * 59 + 59); time <= mainWindow->filterSettings.time_end + (60 * 60 * 23 + 60 * 59 + 59);
} else { } else {
return 0; return 0;