--- a/src/ldtypes.cc Wed Dec 18 23:38:45 2013 +0200 +++ b/src/ldtypes.cc Thu Dec 19 00:59:49 2013 +0200 @@ -273,6 +273,13 @@ // ============================================================================= // ----------------------------------------------------------------------------- +LDSubfile::~LDSubfile() +{ // The document this subfile referenced may be unused now, delete if needed. + LDDocument::closeUnused(); +} + +// ============================================================================= +// ----------------------------------------------------------------------------- void LDObject::deleteSelf() { // If this object was selected, unselect it now if (isSelected())