--- a/file.cpp Thu Mar 21 00:37:15 2013 +0200 +++ b/file.cpp Thu Mar 21 02:45:53 2013 +0200 @@ -425,4 +425,21 @@ const ulong ulSpot = g_qWindow->getInsertionPoint (); objects.insert (objects.begin() + ulSpot, obj); +} + +// ============================================================================= +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// ============================================================================= +void OpenFile::forgetObject (LDObject* obj) { + // Find the index for the given object + ulong ulIndex; + for (ulIndex = 0; ulIndex < (ulong)objects.size(); ++ulIndex) + if (objects[ulIndex] == obj) + break; // found it + + if (ulIndex >= objects.size ()) + return; // was not found + + // Erase it from memory + objects.erase (objects.begin() + ulIndex); } \ No newline at end of file