Skip to content

Commit 749fb70

Browse files
committed
ref #148: fix radio painting when images are not available
1 parent 4a343b3 commit 749fb70

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Prima/Buttons.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ sub paint_classic
10591059
$imNo = $self-> { pressed} ? 1 : 0;
10601060
};
10611061
my $xStart;
1062-
$image = $images[ $imNo];
1062+
$image = $Prima::Cluster::images[ $imNo];
10631063
my @c3d = ( $self-> light3DColor, $self-> dark3DColor);
10641064

10651065
if ( $image) {
@@ -1179,7 +1179,6 @@ sub on_paint
11791179
}
11801180

11811181
package Prima::Radio;
1182-
our @images;
11831182
use base qw(Prima::Cluster);
11841183

11851184
sub profile_default
@@ -1200,7 +1199,7 @@ sub paint_classic
12001199
};
12011200

12021201
my $xStart;
1203-
$image = $images[ $imNo];
1202+
$image = $Prima::Cluster::images[ $imNo];
12041203
if ( $image) {
12051204
$canvas-> put_image( 0, ( $h - $image-> height) / 2, $image);
12061205
$xStart = $image-> width;
@@ -1244,6 +1243,7 @@ sub paint_classic
12441243
$canvas-> fillpoly( [ $s*6, $y+$s*8, $s*8, $y+$s*10, $s*10, $y+$s*8, $s*8, $y+$s*6]);
12451244
}
12461245
}
1246+
return $xStart;
12471247
}
12481248

12491249
sub paint_flat

0 commit comments

Comments
 (0)