mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
Profiler: Let the user select more than one process
This commit is contained in:
parent
325d9445fd
commit
210d2d270d
3 changed files with 47 additions and 21 deletions
|
@ -110,11 +110,11 @@ int main(int argc, char** argv)
|
|||
auto& timeline_header = timeline_header_container->add<TimelineHeader>(*profile, process);
|
||||
timeline_header.set_shrink_to_fit(true);
|
||||
timeline_header.on_selection_change = [&](bool selected) {
|
||||
if (selected) {
|
||||
auto end_valid = process.end_valid == 0 ? profile->last_timestamp() : process.end_valid;
|
||||
profile->set_process_filter(process.pid, process.start_valid, end_valid);
|
||||
} else
|
||||
profile->clear_process_filter();
|
||||
auto end_valid = process.end_valid == 0 ? profile->last_timestamp() : process.end_valid;
|
||||
if (selected)
|
||||
profile->add_process_filter(process.pid, process.start_valid, end_valid);
|
||||
else
|
||||
profile->remove_process_filter(process.pid, process.start_valid, end_valid);
|
||||
|
||||
timeline_header_container->for_each_child_widget([](auto& other_timeline_header) {
|
||||
static_cast<TimelineHeader&>(other_timeline_header).update_selection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue