var-type-dialog: Properly adjust formats when switching buttons.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 27 Jul 2012 06:21:54 +0000 (23:21 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 31 Jul 2012 05:57:33 +0000 (22:57 -0700)
commit0b2c91ffedd167c861b7ed250e5597aa0f4b0220
treeed5d8ac8c3eb11659014c0dc2274202654d2565e
parent127e4edd2968a7a566201ab7052976bb29b1182c
var-type-dialog: Properly adjust formats when switching buttons.

The var-type-dialog based the default new format on the variable's
existing format when a button was clicked, and attempted to adjust
the width and decimals into valid range, but the adjustment wasn't
always correct, so in some cases it could pick an invalid format.

This commit uses fmt_fix_output() instead, which will always choose
a valid output format.
src/ui/gui/var-type-dialog.c