"preserve unchanged props" will be automatically checked when editing attributes on multiple object selection and unchecked on single object selection as this is the 99.9% use case

This commit is contained in:
stefan schippers 2023-01-20 00:35:24 +01:00
parent 6f6bd65035
commit 90bc0fa572
2 changed files with 9 additions and 1 deletions

View File

@ -1501,6 +1501,13 @@ void edit_property(int x)
return;
} /* if((xctx->lastsel==0 ) */
/* set 'preserve unchanged properties if multiple selection */
if(xctx->lastsel > 1) {
tclsetvar("preserve_unchanged_attrs", "1");
} else {
tclsetvar("preserve_unchanged_attrs", "0");
}
switch(xctx->sel_array[0].type)
{
case ELEMENT:

View File

@ -124,7 +124,8 @@ int filter_data(const char *din, const size_t ilen,
fprintf(stderr, "error: conversion failed\n");
ret = 1;
}
_exit(ret);
_exit(ret); /* childs should always use _exit() to avoid
* flushing open stdio streams and other unwanted side effects */
}
/* parent */
close(p1[0]); /*only write to p1 */