Commit 3481bca47a5289e11dd71e1fedaa1c1051d79476

Authored by Edmar Moretti
1 parent e4180073

Resolvido Ticket #121

classesphp/classe_mapa.php
... ... @@ -800,9 +800,6 @@ $random - indica se os nomes dos novos layers serão modificados ou nao
800 800 */
801 801 function adicionaTema($temas,$locaplic,$random="sim")
802 802 {
803   - //error_reporting(E_ALL);
804   -
805   - //include_once($locaplic."/admin/php/menutemas.php");
806 803 //limpa selecao
807 804 if (file_exists(($this->arquivo)."qy"))
808 805 {unlink (($this->arquivo)."qy");}
... ... @@ -889,9 +886,7 @@ $random - indica se os nomes dos novos layers serão modificados ou nao
889 886 if ($nummove > 2)
890 887 {
891 888 for ($i=0;$i<=($nummove - 3);++$i)
892   - {
893   - $this->mapa->movelayerup($indicel);
894   - }
  889 + {$this->mapa->movelayerup($indicel);}
895 890 }
896 891 }
897 892 }
... ...
classesphp/funcoes_gerais.php
... ... @@ -1523,7 +1523,27 @@ function criaLayer($oMapa,$ms_tipo,$ms_status,$metaTema,$metaClasse=&quot;SIM&quot;)
1523 1523 {
1524 1524 $estilo->set( "size",4);
1525 1525 $estilo->set("symbolname","ponto");
1526   - }
  1526 + }
  1527 + //reposiciona o layer na pilha
  1528 + $ltipo = $l->type;
  1529 + if (($ltipo == 2) || ($ltipo == 3))
  1530 + {
  1531 + $indicel = $l->index;
  1532 + $numlayers = $oMapa->numlayers;
  1533 + $nummove = 0;
  1534 + for ($i = $numlayers-1;$i > 0;$i--)
  1535 + {
  1536 + $layerAbaixo = $oMapa->getlayer($i);
  1537 + $tipo = $layerAbaixo->type;
  1538 + if (($tipo != 2) && ($tipo != 3))
  1539 + {$nummove++;}
  1540 + }
  1541 + if ($nummove > 2)
  1542 + {
  1543 + for ($i=0;$i<=($nummove - 3);++$i)
  1544 + {$oMapa->movelayerup($indicel);}
  1545 + }
  1546 + }
1527 1547 return $l;
1528 1548 }
1529 1549 /*
... ...