X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fvariable.c;h=971154368cb7ae5ede7b21d4f88374e6f1e4b752;hb=01cbd30a9b6d38fae395620d2fcc49052d8e8b0f;hp=8758af35b429b6cc026aead9db207aeb283fc339;hpb=30b49ef972d0ff4cd5f5ecda6a447968bc05f356;p=pspp diff --git a/src/data/variable.c b/src/data/variable.c index 8758af35b4..971154368c 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -967,12 +967,14 @@ var_set_display_width_quiet (struct variable *v, int new_width) void var_set_display_width (struct variable *v, int new_width) { - struct variable *ov = var_clone (v); - var_set_display_width_quiet (v, new_width); - dict_var_changed (v, VAR_TRAIT_DISPLAY_WIDTH, ov); + if (v->display_width != new_width) + { + struct variable *ov = var_clone (v); + var_set_display_width_quiet (v, new_width); + dict_var_changed (v, VAR_TRAIT_DISPLAY_WIDTH, ov); + } } - /* Returns the default display width for a variable of the given WIDTH, as set by var_create. The return value can be used to reset a variable's display width to the default. */