From 004ba4439db2428973a645fc91928425f5f7c756 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:05:06 -0800 Subject: [PATCH] PythonEditor : Fix text insertion from dropped VectorData We had a special case only for StringVectorData, this now opens things up to the other *VectorData types. --- Changes.md | 3 +++ python/GafferUI/PythonEditor.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index a7e58235ec9..2d254084883 100644 --- a/Changes.md +++ b/Changes.md @@ -1,7 +1,10 @@ 1.4.15.x (relative to 1.4.15.4) ======== +Fixes +----- +- PythonEditor : Fixed bug preventing values from being inserted when dragging most VectorData types into the PythonEditor. 1.4.15.4 (relative to 1.4.15.3) ======== diff --git a/python/GafferUI/PythonEditor.py b/python/GafferUI/PythonEditor.py index 48e0308be53..6e83c81a088 100644 --- a/python/GafferUI/PythonEditor.py +++ b/python/GafferUI/PythonEditor.py @@ -159,7 +159,7 @@ def __activated( self, widget ) : def __dropText( self, widget, dragData ) : - if isinstance( dragData, IECore.StringVectorData ) : + if IECore.DataTraits.isSequenceDataType( dragData ) : return repr( list( dragData ) ) elif isinstance( dragData, Gaffer.GraphComponent ) : if self.scriptNode().isAncestorOf( dragData ) :