When create new tables, I often fresh the structure of all tables by pressing F5.
This enhancement was on HeidiSQL forum and +1ed twice (https://www.heidisql.com/forum.php?t=21627#p24206)
When the database is selected and you press F5, the list is refreshed without having to do an extra operation
When the database is selected and you press F5, all the table list is collapsed and it forces you to reopen it.
Absolutely reasonable.
Based on the forum threads, I already spent a couple of hours with non working approaches for keeping the db open, re-opening it after the refresh, re-opening it with a timer-hit etc. Nothing worked so far without a crash. The issue sounds easy to solve but it definitely isn't. Mostly due to existing complexity and interlocked events trying to read and write data behind the tree nodes.
Keeping this issue open probably brings up new ideas for solving that.
Possible additional solution: when tree is opened and db is selected, jump first to some db table (like first one) and refresh on it (once that refresh with a table will not close the db tree, and seems that it will do the same effect, once that the query is the same).
I'd like to upvote this but I understand from reading this thread that it might be complex to implement.
I'm sure you have tried a boolean IsRefreshing that is set to true to prevent some background stuff to happening.
If you can track which dbs are uncollapsed, couldn't you loop through them after refreshing and open them again. I mostly work with C# and WinForms but I'm trying to understand this anyway.
Is this the same situation, when I delete a table and the table tree is collapsed?
(And not open anymore)
Most helpful comment
Absolutely reasonable.
Based on the forum threads, I already spent a couple of hours with non working approaches for keeping the db open, re-opening it after the refresh, re-opening it with a timer-hit etc. Nothing worked so far without a crash. The issue sounds easy to solve but it definitely isn't. Mostly due to existing complexity and interlocked events trying to read and write data behind the tree nodes.
Keeping this issue open probably brings up new ideas for solving that.