Automatically determining the top-most node

There are some features which key their behavior on the active object in each category view. However, only the Person category is persistent between sessions. (The Active Person and separate Home Person are stored.)

There is also a Preferences option to Restore Last View when restarting Gramps. So the Active object in a particular Tree and category is stored for that feature. But that’s probably too useless for any other purpose.

The Session Log gramplet and Go Menus track most recently selected objects. But they are flawed in tbis logging capacity as newly created objects are not pushed into into either list. You have to sort the flat list view mode on ‘Last Modified’ to discover newly created objects.

You might want to explore the code of @cdhorn 's set of experimental CardViews. He had to make decision about how to determine Active record and what to use as a fallback for when no record was active.