ui/common/context.c

branch
newapi
changeset 239
5dd24929f9f6
parent 232
e2b33055113f
child 247
4b21af9d8c5a
--- a/ui/common/context.c	Mon Jan 29 14:02:00 2024 +0100
+++ b/ui/common/context.c	Mon Jan 29 18:47:55 2024 +0100
@@ -316,12 +316,19 @@
         case UI_VAR_LIST: {
             // TODO: not sure how correct this is
 
+            UiList *f = from->value;
+            UiList *t = to->value;
+            if (f->obj) {
+                t->obj = f->obj;
+                t->update = f->update;
+            }
+
             UiVar tmp = *from;
             *from = *to;
             *to = tmp;
 
-            UiList* t = to->value;
-            ui_notify(t->observers, NULL);
+            UiList* t2 = to->value;
+            ui_notify(t2->observers, NULL);
             
             break;
         }

mercurial