Skip to content

Commit f807a81

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

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy