Allow users to drag and drop fields from DB Schema dock to editor #1250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first attempt to provide the functionality described in #119.
Drag in the dock is enabled (it was only enabled in the Database Structure tab). Then the fields are enabled for dragging and finally the MIME data exported for the drag and drop is tailored for exporting only the escaped field identifier.
This may interfere to other uses of drag&drop in the Database Structure, so I open this pull request for discussion and refinement. I've reproduced a crash dropping a table between databases, I think it is not related with my changes, but I'll try to figure it out.
Possible improvements: there are two uses of drag&drop and users might be confused. Tables paste the SQL creation and population statements, and fields only the name. Maybe the Dock and the Database Structure should have their own different drag&drop behaviours? Dock for statement composition, sot it would only drop the names; and Database Structure, only for exporting full SQL statements (then in this tab the fields would be again not candidate for dragging).