Two issues during the multi sql file import.

Icos posted 3 months ago in Import/Export

Hi, Ansgar!

I'm often using the Heidi to import several sql files into one database. Usually it's a lengthy process, due to the file sizes and i'm switching to another window, while Heidi does it's job.

And here comes the unpleasant part. Every time Heidi tries to import another file, it shows a message box with a progress indicator. And by some reason it also brings the Heidi on top after that. Since usually during the import i'm typing something or clicking in another window, abrupt switching to the Heidi's window often results in aborted import. Just before you are about to press enter or space Heidi pops on top and it's Abort button is focused, so you cancel the import unwillingly.

Another related problem, which is even worse, if you were clicking on the part of the screen, where the database tree is shown and Heidi pops on top, you end up selecting the different database in the database tree, Heidi executes the "use database name" command and switches the database, while data import is in the process and your data goes into not intended place.

So what i'm asking for is two things:

  1. Disable the popping on top of Heidi during the import entirely or have a setting for it.
  2. Disable the database tree during the import, to avoid the occasional switch to another database.

Hope this makes sense for you. And thanks for your great work as always!

ansgar posted 3 months ago

I suppose it's the progress dialog which steals focus. I just removed a BringToFront command from the code, which was fired at the end of one file import. Please check if the next nightly build fixes that (first) issue.

Icos posted 3 months ago

Tested it today multiple times (5291).

The problem is half fixed now. Heidi itself doesn't comes on top anymore. However, the message box with progress bar still comes on top after a few files were imported and then in a few seconds Heidi's main window appears under it as well.

I was able to reproduce this behavior while importing batches of 50+ files.

ansgar posted 3 months ago

Hm, there is no further call to BringToFront. Probably the additional SetFocus command does similar stuff. Not sure.

Icos posted 3 months ago

I think, it's related to the actual MessageBox method you are using. If you'll replace it with a window and will not open/close it for each file, but rather open it once and change the window's content, the problem will be fixed.

ansgar posted 3 months ago

Maybe. But in that case I would prefer to reuse the dialog for multiple files, without removing it completely, as I find this is quite a nice thing.

Icos posted 3 months ago

That would be great! I'll wait for the next build then.

Thank you very much for fixing this.

ansgar posted 3 months ago

Note that this is just a discussion forum. You can file an issue request in the bugtracker for that purpose.

Icos posted 3 months ago

Should i do it now, or for this one, this thread is enough?

ansgar posted 3 months ago

That above mentioned reuse of the progress dialog is more complex to implement, so that should definitely go into a new issue on the tracker.

Icos posted 3 months ago

Posted a new issue here: https://github.com/HeidiSQL/HeidiSQL/issues/338

Please login to leave a reply, or register at first.