]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/variant.cpp
fixed bug due to which all items in a virtual control stayed sometimes selected even...
[wxWidgets.git] / src / common / variant.cpp
index 859f722a799739a856055f178520eb7d45a68877..defe41807fdf1002c87921e4358e9369369da799 100644 (file)
@@ -1390,6 +1390,7 @@ wxVariant::wxVariant(const wxArrayString& val, const wxString& name) // Strings
 }
 
 wxVariant::wxVariant(const wxVariant& variant)
+    : wxObject()
 {
     if (!variant.IsNull())
     {
@@ -1436,8 +1437,10 @@ void wxVariant::operator= (const wxVariant& variant)
             delete m_data;
         m_data = (wxVariantData*) variant.GetData()->GetClassInfo()->CreateObject();
     }
-//    GetData()->Copy(* variant.GetData());
+
     variant.GetData()->Copy(* GetData());
+
+    m_name = variant.m_name;
 }
 
 // Assignment using data, e.g.
@@ -2051,6 +2054,12 @@ wxStringList& wxVariant::GetStringList() const
     return (wxStringList&) ((wxVariantDataStringList*) m_data)->GetValue();
 }
 
+// Make empty list
+void wxVariant::NullList()
+{
+    SetData(new wxVariantDataList());
+};
+
 // Append to list
 void wxVariant::Append(const wxVariant& value)
 {