idnode: ensure nodes are properly saved on update

This commit is contained in:
Adam Sutton 2013-08-09 23:13:34 +01:00
parent b96c432f69
commit 0253651246
2 changed files with 3 additions and 2 deletions

View file

@ -609,8 +609,8 @@ int
idnode_write0 ( idnode_t *self, htsmsg_t *c, int optmask, int dosave )
{
int save = 0;
void (*savefn)(idnode_t*) = NULL;
const idclass_t *idc = self->in_class;
void (*savefn)(idnode_t*) = idc->ic_save;
save = idnode_class_write_values(self, idc, c, optmask);
if (save && dosave) {
if (savefn) savefn(self);

View file

@ -731,7 +731,8 @@ tvheadend.idnode_tree = function (conf)
var n = tree.getNodeById(o.uuid);
if (n) {
if (o.text) n.setText(o.text);
loader.load(n);
tree.getRootNode().reload();
// cannot get this to properly reload children and maintain state
}
});