68 |
68 |
69 // Remove the old object |
69 // Remove the old object |
70 delete oldobj; |
70 delete oldobj; |
71 |
71 |
72 // Replace all instances of the old object with the new object |
72 // Replace all instances of the old object with the new object |
73 for (ulong i = 0; i < g_CurrentFile->objects.size(); ++i) { |
73 objPointer::replacePointers (oldobj, obj); |
74 if (g_CurrentFile->objects[i] == oldobj) { |
|
75 g_CurrentFile->objects[i] = obj; |
|
76 break; |
|
77 } |
|
78 } |
|
79 |
74 |
80 // Rebuild stuff after this |
75 // Rebuild stuff after this |
81 parent->buildObjList (); |
76 parent->buildObjList (); |
82 parent->R->hardRefresh (); |
77 parent->R->hardRefresh (); |
83 } |
78 } |