Commit 5ad781ea authored by Stefan Tauner's avatar Stefan Tauner
Browse files

FIJISettingsViewer: allow FIU names to be replaced/deleted by empty strings

parent 854a3c39
...@@ -1239,8 +1239,11 @@ sub _rename_fiu_dialog { ...@@ -1239,8 +1239,11 @@ sub _rename_fiu_dialog {
my $rv = $rename_dialog->Show(); my $rv = $rename_dialog->Show();
my $fiu_name = $e->get(); my $fiu_name = $e->get();
if ($rv eq "OK" && (!$fiu_name =~ /^[\t ]*$/)) { if ($rv eq "OK") {
my $name_str = "FIU$i (\"$fiu_name\")"; $fiu_name =~ s/^\s+|\s+$//g; # Trim whitespace left and right
my $id_str = "FIU$i";
my $name_str = $id_str;
$name_str .= " (\"$fiu_name\")" if (defined($fiu_name) && length($fiu_name) > 0);
@{$self->{settings}->{fius}}[$i]->{'FIU_NAME'} = $fiu_name; @{$self->{settings}->{fius}}[$i]->{'FIU_NAME'} = $fiu_name;
$labframe->configure(-label => $name_str); $labframe->configure(-label => $name_str);
$self->_check_change(); $self->_check_change();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment