src/ldDocument.cpp

changeset 996
9ecc878c7dea
parent 994
09e1a3e272ec
equal deleted inserted replaced
995:7986584e7498 996:9ecc878c7dea
828 Matrix transform; 828 Matrix transform;
829 829
830 for (int i = 0; i < 9; ++i) 830 for (int i = 0; i < 9; ++i)
831 transform[i] = tokens[i + 5].toDouble(); // 5 - 13 831 transform[i] = tokens[i + 5].toDouble(); // 5 - 13
832 832
833 obj->setTransform (transform); 833 obj->setTransformationMatrix (transform);
834 obj->setFileInfo (load); 834 obj->setFileInfo (load);
835 return obj; 835 return obj;
836 } 836 }
837 837
838 case 2: 838 case 2:
870 { 870 {
871 CheckTokenCount (tokens, 14); 871 CheckTokenCount (tokens, 14);
872 CheckTokenNumbers (tokens, 1, 13); 872 CheckTokenNumbers (tokens, 1, 13);
873 873
874 // Quadrilateral / Conditional line 874 // Quadrilateral / Conditional line
875 LDObject* obj; 875 LDVertexObject* obj;
876 876
877 if (num == 4) 877 if (num == 4)
878 obj = LDSpawn<LDQuad>(); 878 obj = LDSpawn<LDQuad>();
879 else 879 else
880 obj = LDSpawn<LDCondLine>(); 880 obj = LDSpawn<LDCondLine>();
1115 static_cast<LDSubfile*> (obj)->fileInfo()->getDisplayName(), 1115 static_cast<LDSubfile*> (obj)->fileInfo()->getDisplayName(),
1116 getDisplayName()); 1116 getDisplayName());
1117 continue; 1117 continue;
1118 } 1118 }
1119 1119
1120 LDPolygon* data = obj->getPolygon(); 1120 if (obj->hasVertices())
1121
1122 if (data)
1123 { 1121 {
1124 m_polygonData << *data; 1122 LDPolygon* polygon = static_cast<LDVertexObject*> (obj)->getPolygon();
1125 delete data; 1123
1124 if (polygon)
1125 {
1126 m_polygonData << *polygon;
1127 delete polygon;
1128 }
1126 } 1129 }
1127 } 1130 }
1128 1131
1129 m_needsReCache = false; 1132 m_needsReCache = false;
1130 } 1133 }

mercurial