| 303 | } |
| 304 | |
| 305 | void KeyEdge::correctGeometry() |
| 306 | { |
| 307 | if(geometry()) |
| 308 | { |
| 309 | if(isClosed()) |
| 310 | { |
| 311 | // Fast hack to call linearSpline->curve()->resample(true). |
| 312 | // will not actually change the start and end position |
| 313 | geometry()->makeLoop(); |
| 314 | geometry()->setLeftRightPos(Eigen::Vector2d(0,0), Eigen::Vector2d(0,0)); |
| 315 | } |
| 316 | else |
| 317 | { |
| 318 | geometry()->setLeftRightPos(startVertex()->pos(), endVertex()->pos()); |
| 319 | } |
| 320 | |
| 321 | processGeometryChanged_(); |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | void KeyEdge::setWidth(double newWidth) |
| 326 | { |