* Updates the control point's type. This updates the last modified attributes * of this point. * * @see PointType * * @param newType The new type this control point should be */
| 703 | * @param newType The new type this control point should be |
| 704 | */ |
| 705 | ControlPoint::Status ControlPoint::SetType(PointType newType) { |
| 706 | if (type != Fixed && type != Free && type != Constrained) { |
| 707 | QString msg = "Invalid Point Enumeration, [" + toString(type) + "], for " |
| 708 | "Control Point [" + GetId() + "]"; |
| 709 | throw IException(IException::Programmer, msg, _FILEINFO_); |
| 710 | } |
| 711 | |
| 712 | if (editLock) { |
| 713 | return PointLocked; |
| 714 | } |
| 715 | if (parentNetwork) { |
| 716 | parentNetwork->emitPointModified(this, ControlPoint::TypeModified, type, newType); |
| 717 | } |
| 718 | |
| 719 | PointModified(); |
| 720 | type = newType; |
| 721 | return Success; |
| 722 | } |
| 723 | |
| 724 | |
| 725 | /** |