FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

=Avoid converting ObservableCollection<T> into python list · attackgithub/pythonnet@f807a81 · GitHub

Repository navigation

Commit f807a81

Browse files
authored andcommitted
=Avoid converting ObservableCollection<T> into python list
1 parent 88d61a9 commit f807a81

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/runtime/converter.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Reflection;
66
using System.Runtime.InteropServices;
77
using System.Security;
8+
using System.ComponentModel;
89

910
namespace Python.Runtime
1011
{
@@ -134,8 +135,8 @@ internal static IntPtr ToPython(object value, Type type)
134135
return result;
135136
}
136137

137-
if (value is IList && value.GetType().IsGenericType)
138-
{
138+
if (value is IList && !(value is INotifyPropertyChanged) && value.GetType().IsGenericType)
139+
{
139140
using (var resultlist = new PyList())
140141
{
141142
foreach (object o in (IEnumerable)value)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL