-
Notifications
You must be signed in to change notification settings - Fork 2
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
Drag drop #262
Drag drop #262
Conversation
pasta_eln/GUI/project.py
Outdated
@@ -314,6 +314,7 @@ def modelChanged(self, item:QStandardItem) -> None: | |||
Args: | |||
item (QStandardItem): item changed, new location | |||
""" | |||
print('start project model changed') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use log.info instead of print, if not needed please remove the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmurugan-fzj Thanks, this was an old debugging message, I forgot to remove. Removed it now
pasta_eln/GUI/projectTreeView.py
Outdated
@@ -171,6 +172,61 @@ def tree2Clicked(self) -> None: | |||
return | |||
|
|||
|
|||
def dragEnterEvent(self, event:QMouseEvent) -> None: | |||
""" | |||
Overwrite default: what happens if you drag an item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean "override"? Is this a base class function which is been overridden here in this clasS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
pasta_eln/GUI/projectTreeView.py
Outdated
|
||
def dropEvent(self, event:QMouseEvent) -> None: | ||
""" | ||
Overwrite default: what happens at end of drag&drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Override?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
pasta_eln/GUI/projectTreeView.py
Outdated
elif 'application/x-qstandarditemmodeldatalist' in event.mimeData().formats(): | ||
super().dropEvent(event) | ||
else: | ||
print('Drop unknown data', event.mimeData().formats()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use log.warning! or log.error if you need to see the message in console too..!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct
Implement drag and drop of external files, which was requested in #12