Hello. I would like you to check this patch. Frequently there are opened several windows: edit grids and queries. In this case, if you try to change macro or favourites list, pgadmin exits with error immediately. Though, this isn't happening while all edit grids are closed. I propose a solution - to check the presence of the macros menu (or favourites, if you change the favourites list) and the visibility of the query window (to prevent false event when the window is just starts to be opened). Patch is attached to the letter. Thank you.