Fix crash in Spot Removal tool when deleting a Spot entry
This commit is contained in:
parent
4a9d913c50
commit
1935820884
@ -460,12 +460,11 @@ CursorShape Spot::getCursor (int objectID, int xPos, int yPos) const
|
|||||||
return CSEmpty;
|
return CSEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
int object = editProvider->getObject();
|
if (objectID == 0 || objectID == 1) {
|
||||||
if (object == 0 || object == 1) {
|
|
||||||
return CSMove2D;
|
return CSMove2D;
|
||||||
}
|
}
|
||||||
if (object >= 2 || object <= 5) {
|
if (objectID >= 2 && objectID <= 5) {
|
||||||
Coord delta(Coord(xPos, yPos) - ((object == 3 || object == 5) ? spots.at(activeSpot).sourcePos : spots.at(activeSpot).targetPos));
|
Coord delta(Coord(xPos, yPos) - ((objectID == 3 || objectID == 5) ? spots.at(activeSpot).sourcePos : spots.at(activeSpot).targetPos));
|
||||||
PolarCoord polarPos(delta);
|
PolarCoord polarPos(delta);
|
||||||
if (polarPos.angle < 0.) {
|
if (polarPos.angle < 0.) {
|
||||||
polarPos.angle += 180.;
|
polarPos.angle += 180.;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user