Prevent user from saving a preset with the "- default -" name. #1717

This commit is contained in:
Alessandro Ranellucci 2014-03-23 21:40:45 +01:00
parent e9620c30b1
commit 67f3e9962b
2 changed files with 9 additions and 5 deletions

View file

@ -119,7 +119,7 @@ sub _handle_legacy {
if ($opt_key eq 'gcode_flavor' && $value eq 'makerbot') {
$value = 'makerware';
}
if ($opt_key eq 'fill_density' && $value <= 1) {
if ($opt_key eq 'fill_density' && defined($value) && $value <= 1) {
# fill_density was turned into a percent value
$value *= 100;
$value = "$value"; # force update of the PV value, workaround for bug https://rt.cpan.org/Ticket/Display.html?id=94110