Skip to content

Commit

Permalink
Don't increment the target index if the operational layer is invalid …
Browse files Browse the repository at this point in the history
…(e.g. a raster or a terrain model) (#289) (#290)
  • Loading branch information
JamesMBallard authored and Michael Tims committed Sep 25, 2018
1 parent a00f348 commit 0e98928
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Shared/alerts/AlertConditionsController.cpp
Expand Up @@ -1053,7 +1053,6 @@ AlertTarget* AlertConditionsController::targetFromItemIdAndIndex(int itemId, int
const int opLayersCount = operationalLayers->rowCount();
for (int i = 0; i < opLayersCount; ++i)
{
currIndex++;
Layer* layer = operationalLayers->at(i);
if (!layer)
continue;
Expand All @@ -1062,6 +1061,8 @@ AlertTarget* AlertConditionsController::targetFromItemIdAndIndex(int itemId, int
if (!featLayer)
continue;

currIndex++;

if (currIndex == targetOverlayIndex)
{
if (itemId == -1)
Expand Down

0 comments on commit 0e98928

Please sign in to comment.