diff --git a/fhem/FHEM/55_InfoPanel.pm b/fhem/FHEM/55_InfoPanel.pm index f8e83e408..cfe971a05 100644 --- a/fhem/FHEM/55_InfoPanel.pm +++ b/fhem/FHEM/55_InfoPanel.pm @@ -765,6 +765,8 @@ sub btIP_evalLayout { my ($width,$height)= split(/x/, AttrVal($name,"size","800x600")); my @layout= split("\n", $layout); + my %pstack; + my $pstackcount = 0; my %params; $params{name}= $name; $params{width}= $width; @@ -824,6 +826,21 @@ sub btIP_evalLayout { eval { given($cmd) { +when("push") { +$pstackcount++; +while ( my ($key, $value) = each(%params) ) { + $pstack{$pstackcount}{$key} = $value; + } +} + +when("pop") { +while ( my ($key, $value) = each($pstack{$pstackcount}) ) { + $params{$key} = $value; + } +delete $pstack{$pstackcount}; +$pstackcount--; +} + when("area") { ($id,$x1,$y1,$x2,$y2,$link)= split("[ \t]+", $def, 6); ($x1,$y1)= btIP_xy($x1,$y1,%params);