Commit f888b45d7ead2d2b981a2fa8ad99726fe3449c48
1 parent
6c084633
Exists in
master
and in
7 other branches
Correção de bug nas opções de seleção que estavam duplicando elementos quando da…
… seleção por mais de uma vez do mesmo elemento
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
classesphp/classe_selecao.php
... | ... | @@ -511,6 +511,7 @@ $shp_atual - Indices dos elementos já selecionados. |
511 | 511 | $this->layer->set("template","none.htm"); |
512 | 512 | $indxlayer = $this->layer->index; |
513 | 513 | $shp = array_merge($shpi,$shp_atual); |
514 | + $shp = array_unique($shp); | |
514 | 515 | $this->mapa->freequery($indxlayer); |
515 | 516 | foreach ($shp as $indx) |
516 | 517 | {@$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} |
... | ... | @@ -534,6 +535,7 @@ $shp_atual - Indices dos elementos já selecionados. |
534 | 535 | $indxlayer = $this->layer->index; |
535 | 536 | $this->mapa->freequery($indxlayer); |
536 | 537 | $shp = array_diff($shp_atual,$shpi); |
538 | + $shp = array_unique($shp); | |
537 | 539 | $this->mapa->freequery($indxlayer); |
538 | 540 | foreach ($shp as $indx) |
539 | 541 | {$this->mapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} |
... | ... | @@ -558,6 +560,7 @@ $ids - Ids separados por vírgula correspondendo aos registros. |
558 | 560 | {$this->mapa->loadquery(($this->arquivo)."qy");} |
559 | 561 | $ids = explode(",",$ids); |
560 | 562 | $indxlayer = $this->layer->index; |
563 | + $ids = array_unique($ids); | |
561 | 564 | foreach ($ids as $i) |
562 | 565 | {$this->mapa->queryByIndex($indxlayer, -1, $i);} |
563 | 566 | $this->mapa->savequery(($this->arquivo)."qy"); | ... | ... |