[ENH] Select Columns: Accept partially correct drops#6390
Merged
ales-erjavec merged 2 commits intobiolab:masterfrom May 12, 2023
Merged
[ENH] Select Columns: Accept partially correct drops#6390ales-erjavec merged 2 commits intobiolab:masterfrom
ales-erjavec merged 2 commits intobiolab:masterfrom
Conversation
janezd
commented
Apr 7, 2023
| if self.primitive and not all(var.is_primitive() for var in variables): | ||
| variables = [var for var in variables if var.is_primitive()] | ||
| self[row:row] = variables | ||
| mime.setProperty("_moved", variables) |
Contributor
Author
There was a problem hiding this comment.
@ales-erjavec, MIME is passed from source of the drag to its destination. In this PR, destination may accept only some data, so it must have a way to pass the list of accepted variables back to the source. drag.exec does not return values. Here I treated mime data as a shared, two-way object. It works, but is it OK? Documentation neither mentions nor prohibits it.
445613d to
34dc780
Compare
34dc780 to
1682368
Compare
dd5ed1c to
851cf6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Fixes #5897.
Drag & Drop between VariablesListViews rejects drops that contain any variables of unacceptable type.
Description of changes
Includes