KeePass does not remember the last view settings when the "Activate database (select tab)" action is triggered during locking (database closing).
Assume I have two databases, DB_1 and DB_2. When a trigger, set to activate DB_1 when DB_2 is closed, is executed during locking, the following occurs:
1 DB_2 is closed
2 DB_1 is activated (selected) >> as expected
3 DB_1 is closed
4 KeePass interface is updated showing both databases locked and DB_2 is active (selected) >> not as expected - it should should be DB_1 which is active (ie tab selected)
Step 4 showing DB_2 is active is not the intended result of this trigger. (DB_1 should be active)
The steps are not readily observable via the KeePass interface unless adding additional triggers using the WAIT action and linked to the database closings are added. This allows the observation that DB_1 was selected during locking, but that the selection was then forgotten.
Fixing of this bug should allow a user to specify which database is opened when an AutoType is performed because KeePass always opens the selected tab database when all databases are closed.