52 |
52 |
53 LDEdgeLine* LDConditionalEdge::becomeEdgeLine() |
53 LDEdgeLine* LDConditionalEdge::becomeEdgeLine() |
54 { |
54 { |
55 LDEdgeLine* replacement = model()->emplaceReplacement<LDEdgeLine>(this); |
55 LDEdgeLine* replacement = model()->emplaceReplacement<LDEdgeLine>(this); |
56 |
56 |
57 for (int i = 0; i < replacement->numVertices(); ++i) |
57 if (replacement) |
58 replacement->setVertex (i, vertex (i)); |
58 { |
|
59 for (int i = 0; i < replacement->numVertices(); ++i) |
|
60 replacement->setVertex (i, vertex (i)); |
59 |
61 |
60 replacement->setColor (color()); |
62 replacement->setColor (color()); |
|
63 } |
|
64 |
61 return replacement; |
65 return replacement; |
62 } |
66 } |