Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading SQL file Replaces current tab instead of opening a new one. Never warns of unsaved data. #270

Closed
yphastos opened this issue May 21, 2018 · 1 comment
Milestone

Comments

@yphastos
Copy link

@yphastos yphastos commented May 21, 2018

Steps to reproduce this issue

  1. Create new tab and have some content in it
  2. Load a SQL file, (via Ctrl+O, File->Load SQL File, or context menu within tabs content)
  3. The currently selected tab, gets REPLACED with the loaded file, and if it had unsaved content (unsaved file, or saved file with modifications), it doesn't warn about it, losing all unsaved data.

Current behavior

The current tab gets completely replaced without warning, losing all content (saved or not).

Expected behavior

The loaded file should open in ANOTHER tab, never replacing the current one. That is completely anti-intuitive and may lead to lost data.
Even if it is meant to load in the SAME tab, (which I see no reason to be), it should at least warn that current unsaved content would be lost and prompt to save it first.

Possible solution

Never replace current tab with loaded files, always open them in new tabs, and let the already open tabs as they are.

Environment

  • HeidiSQL version: 9.5.0.5277
@yphastos

This comment has been minimized.

Copy link
Author

@yphastos yphastos commented May 21, 2018

@ansgarbecker Update

I've noticed that if you drag and drop a file into Heidi (into a query tab), it gets loaded in the first 'empty' tab (any tab that has no content yet), and if there is no empty tab, the file gets loaded into a tab of its own.

It is a better behavior than when loading files via the "Load SQL file..." option (the issue I describe), because it never clears unsaved content neither closes (substitutes) current tabs.

Maybe you could implement it in such way that opening files via menus (or Ctrl+O), has the same effect as dragging them into the app.

The only bug with dragging is that if the file loads in a currently empty but unfocused tab, such tab doesn't get the focus with the new content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.