Desktop: Consider Severity when Hiding Events.

When events are hidden in the profile, only hide events with the same
name and the same severity (flags).
From discussion in https://github.com/subsurface/libdc/pull/54.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2023-07-28 01:21:25 +12:00
parent b324849d0c
commit 26f20b805d
5 changed files with 17 additions and 22 deletions

View file

@ -39,13 +39,6 @@ extern "C" bool is_event_hidden(const char *eventname)
return it != event_names.end() && !it->plot;
}
extern "C" void hide_event(const char *eventname)
{
auto it = std::find(event_names.begin(), event_names.end(), eventname);
if (it != event_names.end())
it->plot = false;
}
extern "C" void show_all_events()
{
for (event_name &en: event_names)