HeidiSQL UI Bug

[expired user #10276]'s profile image [expired user #10276] posted 7 years ago in General Permalink

When you disconnect from the last server, HeidiSQL asks if you want to save the script, if there is one. If you select cancel, then the window stays visible without an open connection. Almost any action you try to perform now will crash the application.

I recommend disconnecting after the "Save changes" question. This way, "cancel" also makes sense.

ansgar's profile image ansgar posted 7 years ago Permalink

Yeah, you have hit a nice bug :)

And I think there should be no cancel button at all in that case.

[expired user #10276]'s profile image [expired user #10276] posted 7 years ago Permalink

And I think there should be no cancel button at all in that case.

There is a cancel button if you try to close with the [X], so naturally, it would make sense for one to be there if you disconnect from the last server.

Yes - Save script, then disconnect (if actually saved)

No - Don't save and close

Cancel - Stay open and connected.

ansgar's profile image ansgar posted 7 years ago Permalink

That approach does not work in one particular situation which I thought you described in your first post:

  • have 1 connection open
  • type something into a query tab
  • disconnect from the open connection
  • press cancel when the session manager asks for a new connection
  • now the save-file dialog shows up where you say "stay open and connected" - I am no longer connected! So that cancel button is obsolete in that case.
[expired user #10276]'s profile image [expired user #10276] posted 7 years ago Permalink

Wouldn't the solution be to ask before actually disconnecting?

ansgar's profile image ansgar posted 7 years ago Permalink

The disconnect is one click earlier. Please try to reproduce that.

[expired user #10276]'s profile image [expired user #10276] posted 7 years ago Permalink

The disconnect is one click earlier. Please try to reproduce that.

Well just ask the user before you actually disconnect if there are unsaved changes.

The way I see it, the main Window is not supposed to be visible without a connection, so the flow should be like this:

  • User attempts to disconnect
  • Application checks, if that is the last open connection
  • If it is the last connection, then check if there are unsaved editor changes and offer the user to save/discard/cancel.
  • If the user selects to save, open the save dialog and if that returns a success code, save the file. If this succeeds too, then disconnect and close the window
  • If the user selects to discard the changes, just disconnect and close the window
  • If the user selects to cancel, do nothing.

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