ui/common/types.c

changeset 141
cc2170ea05ad
parent 140
c03c338a7dcf
child 142
46448d38885c
--- a/ui/common/types.c	Fri Nov 10 17:17:14 2017 +0100
+++ b/ui/common/types.c	Fri Nov 10 18:04:40 2017 +0100
@@ -277,22 +277,37 @@
 }
 
 
+void uic_int_save(UiInteger *i) {
+    i->value = i->get(i);
+}
+
+void uic_string_save(UiString *s) {
+    s->get(s);
+}
+
+void uic_text_save(UiText *t) {
+    t->get(t);
+    t->position(t);
+}
+
+void uic_range_save(UiRange *r) {
+    r->get(r);
+}
+
+
 void uic_int_unbind(UiInteger *i) {
-    i->value = i->get(i);
     i->get = NULL;
     i->set = NULL;
     i->obj = NULL;
 }
 
 void uic_string_unbind(UiString *s) {
-    s->value = s->get(s);
     s->get = NULL;
     s->set = NULL;
     s->obj = NULL;
 }
 
 void uic_text_unbind(UiText *t) {
-    t->value = t->get(t);
     t->set = NULL;
     t->get = NULL;
     t->getsubstr = NULL;
@@ -306,7 +321,6 @@
 }
 
 void uic_range_unbind(UiRange *r) {
-    r->value = r->get(r);
     r->get = NULL;
     r->set = NULL;
     r->setextent = NULL;

mercurial