[solved] How to merge midi track info

When I record a track, each new take creates its own ‘grouping’ of midi notes/information. These groups are all on the same track but separate themselves when I click on the ‘edit in place’ button and when it’s not clicked sometimes leads to notes and info grayed out when I’m trying to edit the whole track together. This may be as clear as mud so I’ve uploaded a screen grab.
I liked to know if there’s a setting that will make it so each new take is automatically merged with the old take(s) as I record, and also how to merge separate takes already recorded as shown in the pic.

The glue tool will connect segments. There is a button on the track to expand lanes for comping/bouncing/mangling … however MIDI comping is pretty screwy. Also, remember there are options on the transport for how you record MIDI when looping.

Thank you so much! I quickly figured out how to the use the glue tool and also set the midi recording option to ‘stacked’–problems solved.
Holy moly, you can’t believe how long this has bugged me! Wish I would’ve asked a long time ago.