New config field extruder_color for preview of extruder assignment.

This commit is contained in:
bubnikv 2017-05-24 15:20:20 +02:00
parent 2713aa1772
commit 7d64c465c0
13 changed files with 284 additions and 64 deletions

View file

@ -423,8 +423,10 @@ sub get_value {
sub _string_to_colour {
my ($self, $string) = @_;
$string =~ s/^#//;
# If the color is in an invalid format, set it to white.
$string = 'FFFFFF' if ($string !~ m/^[[:xdigit:]]{6}/);
return Wx::Colour->new(unpack 'C*', pack 'H*', $string);
}