Stefan Schuermans commited on 2013-01-29 19:36:44
Showing 1 changed files, with 8 additions and 0 deletions.
| ... | ... |
@@ -30,6 +30,14 @@ void Layer::improvePaths(double eqDist) |
| 30 | 30 |
bool change; |
| 31 | 31 |
double smallest, dist; |
| 32 | 32 |
|
| 33 |
+ // remove empty paths |
|
| 34 |
+ path = mPaths.begin(); |
|
| 35 |
+ while (path != mPaths.end()) |
|
| 36 |
+ if (path->mPoints.empty()) |
|
| 37 |
+ path = mPaths.erase(path); |
|
| 38 |
+ else |
|
| 39 |
+ ++path; |
|
| 40 |
+ |
|
| 33 | 41 |
// join paths with equal begin/end points |
| 34 | 42 |
do {
|
| 35 | 43 |
change = false; |
| 36 | 44 |