Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -500,7 +500,7 @@ bool EntityScriptingInterface::setPoints(QUuid entityID, std::function<bool(Poly · 499 unmodified lines | ||
| 500 | 500 | |
| 501 | 501 | EntityTypes::EntityType entityType = entity->getType(); |
| 502 | 502 | |
| 503 | − if (entityType != EntityTypes::Line) { | |
| 503 | + if (entityType != EntityTypes::PolyLine) { | |
| 504 | 504 | return false; |
| 505 | 505 | } |
| 506 | 506 | |
| @@ -554,14 +554,14 @@ bool EntityScriptingInterface::setAllPoints(QUuid entityID, const QVector<glm::v · 47 unmodified lines | ||
| 554 | 554 | if (entityType == EntityTypes::Line) { |
| 555 | 555 | return setPoints(entityID, [points](LineEntityItem& lineEntity) -> bool |
| 556 | 556 | { |
| 557 | − return lineEntity.setLinePoints(points); | |
| 557 | + return (LineEntityItem*)lineEntity.setLinePoints(points); | |
| 558 | 558 | }); |
| 559 | 559 | } |
| 560 | 560 | |
| 561 | 561 | if (entityType == EntityTypes::PolyLine) { |
| 562 | − return setPoints(entityID, [points](PolyLineEntityItem& PolyLineEntity) -> bool | |
| 562 | + return setPoints(entityID, [points](PolyLineEntityItem& polyLineEntity) -> bool | |
| 563 | 563 | { |
| 564 | − return PolyLineEntity.setLinePoints(points); | |
| 564 | + return (PolyLineEntityItem*)polyLineEntity.setLinePoints(points); | |
| 565 | 565 | }); |
| 566 | 566 | } |
| 567 | 567 | |
| @@ -579,14 +579,14 @@ bool EntityScriptingInterface::appendPoint(QUuid entityID, const glm::vec3& poin · 11 unmodified lines | ||
| 579 | 579 | if (entityType == EntityTypes::Line) { |
| 580 | 580 | return setPoints(entityID, [point](LineEntityItem& lineEntity) -> bool |
| 581 | 581 | { |
| 582 | − return lineEntity.appendPoint(point); | |
| 582 | + return (LineEntityItem*)lineEntity.appendPoint(point); | |
| 583 | 583 | }); |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | if (entityType == EntityTypes::PolyLine) { |
| 587 | 587 | return setPoints(entityID, [point](PolyLineEntityItem& PolyLineEntity) -> bool |
| 588 | 588 | { |
| 589 | − return PolyLineEntity.appendPoint(point); | |
| 589 | + return (PolyLineEntityItem*)PolyLineEntity.appendPoint(point); | |
| 590 | 590 | }); |
| 591 | 591 | } |
| 592 | 592 | |