]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/list.cpp
Added WS_VSCROLL and WSHSCROLL styles again
[wxWidgets.git] / src / common / list.cpp
index e442699d80a9aa72a8f123e88dbf2d1aec8889f4..9d88dea967b743fd963e0e9568cf2b7972619b66 100644 (file)
@@ -171,9 +171,38 @@ void wxListBase::DoCopy(const wxListBase& list)
     m_nodeFirst =
     m_nodeLast = (wxNodeBase *) NULL;
 
-    for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() )
-    {
-        Append(node);
+    switch (m_keyType) {
+    
+        case wxKEY_INTEGER:
+            {
+                long key;                
+                for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() )
+                {
+                    key = node->GetKeyInteger();
+                    Append(key, node->GetData());
+                }
+                break;
+            }
+
+        case wxKEY_STRING:
+            {
+                const wxChar *key;                
+                for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() )
+                {
+                    key = node->GetKeyString();
+                    Append(key, node->GetData());
+                }
+                break;
+            }
+
+        default:
+            {
+                for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() )
+                {
+                    Append(node->GetData());
+                }
+                break;
+            }
     }
 }