Implement graph jump to previous period

This commit is contained in:
emanuele-f 2018-09-13 19:47:37 +02:00
parent eb1509b8a0
commit 9919e500aa
4 changed files with 11 additions and 6 deletions

View file

@ -202,10 +202,12 @@ function graphMenuDivider()
end
function graphMenuGetActive(schema, params)
local ignore_tags = {epoch_begin=1, epoch_end=1, zoom=1, version=1}
for _, entry in pairs(graph_menu_entries) do
if entry.schema == schema and entry.params then
for k, v in pairs(params) do
if (k ~= "zoom") and tostring(entry.params[k]) ~= tostring(v) then
if (not ignore_tags[k]) and tostring(entry.params[k]) ~= tostring(v) then
goto continue
end
end