src/ldObject.cpp

changeset 1017
fc1c13db9618
parent 1015
92c6ec099075
child 1023
9450ac3cd930
equal deleted inserted replaced
1016:3b279b5e57d3 1017:fc1c13db9618
215 int idx = lineNumber(); 215 int idx = lineNumber();
216 216
217 if (idx != -1) 217 if (idx != -1)
218 { 218 {
219 // Replace the instance of the old object with the new object 219 // Replace the instance of the old object with the new object
220 document()->setObject (idx, other); 220 document()->setObjectAt (idx, other);
221 221
222 // Remove the old object 222 // Remove the old object
223 destroy(); 223 destroy();
224 } 224 }
225 } 225 }
229 int idx = lineNumber(); 229 int idx = lineNumber();
230 230
231 if (idx != -1 and not others.isEmpty()) 231 if (idx != -1 and not others.isEmpty())
232 { 232 {
233 for (int i = 1; i < others.size(); ++i) 233 for (int i = 1; i < others.size(); ++i)
234 document()->insertObj (idx + i, others[i]); 234 document()->insertObject (idx + i, others[i]);
235 235
236 document()->setObject (idx, others[0]); 236 document()->setObjectAt (idx, others[0]);
237 destroy(); 237 destroy();
238 } 238 }
239 } 239 }
240 240
241 // ============================================================================= 241 // =============================================================================
771 return; 771 return;
772 } 772 }
773 } 773 }
774 774
775 // Not inverted, thus prefix it with a new invertnext. 775 // Not inverted, thus prefix it with a new invertnext.
776 document()->insertObj (idx, new LDBfc (BfcStatement::InvertNext)); 776 document()->insertObject (idx, new LDBfc (BfcStatement::InvertNext));
777 } 777 }
778 778
779 // ============================================================================= 779 // =============================================================================
780 // 780 //
781 void LDLine::invert() 781 void LDLine::invert()
1208 void LDSubfileReference::setFileInfo (LDDocument* newReferee) 1208 void LDSubfileReference::setFileInfo (LDDocument* newReferee)
1209 { 1209 {
1210 changeProperty (this, &m_fileInfo, newReferee); 1210 changeProperty (this, &m_fileInfo, newReferee);
1211 1211
1212 if (document()) 1212 if (document())
1213 document()->needRecount(); 1213 document()->recountTriangles();
1214 1214
1215 // If it's an immediate subfile reference (i.e. this subfile is in an opened document), we need to pre-compile the 1215 // If it's an immediate subfile reference (i.e. this subfile is in an opened document), we need to pre-compile the
1216 // GL polygons for the document if they don't exist already. 1216 // GL polygons for the document if they don't exist already.
1217 if (newReferee and 1217 if (newReferee and
1218 newReferee->isCache() == false and 1218 newReferee->isCache() == false and

mercurial