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

CatalogueUI : Don't "steal" irrelevant drags #6168

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Fixes

- GraphEditor : Fixed errors when dragging an unknown file type into the GraphEditor.
- Widget : Fixed `event.sourceWidget` for DragDropEvents generated from a Qt native drag within the same Gaffer process. This will now reference the `GafferUI.Widget` that the Qt source widget belongs to, if any.
- Catalogue : Fixed bug which "stole" drags that crossed the image listing but which were destined elsewhere, for instance a drag from the HierarchyView to a PathFilter in the GraphEditor.

1.4.15.2 (relative to 1.4.15.1)
========
Expand Down
4 changes: 2 additions & 2 deletions python/GafferImageUI/CatalogueUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ def __dropImage( self, eventData ) :

def __pathListingDragEnter( self, widget, event ) :

if isinstance( event.data, IECore.StringVectorData ) :
if event.sourceWidget is widget and isinstance( event.data, IECore.StringVectorData ) and event.data :
# Allow reordering of images
self.__moveToPath = None
self.__mergeGroupId += 1
Expand All @@ -1101,7 +1101,7 @@ def __pathListingDragLeave( self, widget, event ) :

def __pathListingDragMove( self, listing, event ) :

if not event.data or not isinstance( event.data, IECore.StringVectorData ) :
if not ( event.sourceWidget is listing and isinstance( event.data, IECore.StringVectorData ) and event.data ) :
return

targetPath = self.__pathListing.pathAt( event.line.p0 )
Expand Down