Opening different Tracktion edit after one's been loaded?

I have a controller class that opens a te::Edi from a file into songEdit in its constructor like so:

Controller::Controller(File editFile) :
  engine(ProjectInfo::projectName, nullptr, std::make_unique<CustomEngineBehaviour>()),
  songEdit(te::Edit::Options {
    engine,
    te::loadEditFromFile(engine, editFile, {}),
    te::ProjectItemID::createNewID(0),
    te::Edit::forEditing,
    nullptr,
    te::Edit::getDefaultNumUndoLevels(),
    [editFile] { return editFile; }
  })
{ 
    /* constructor code... */ 
}

Now I’d like to open a different edit file without closing and re-opening the window. I tried creating a new te::Edit and assigning songEdit to it like this:

te::Edit newSongEdit(te::Edit::Options {
    engine,
    te::loadEditFromFile(engine, songEditFile, {}),
    te::ProjectItemID::createNewID(0),
    te::Edit::forEditing,
    nullptr,
    te::Edit::getDefaultNumUndoLevels(),
    [songEditFile] { return songEditFile; }
});
songEdit = newSongEdit;

But I get the error "tracktion_engine::Edit &tracktion_engine::Edit::operator=(const tracktion_engine::Edit &)" is inaccessible.

How should I load a different edit into one that’s already loaded?

The Edit is a massively complicated object with thousands of sub-objects, all kinds of listeners, interactions with other threads and other complications. If the class had an operator= then it’d create all kinds of opportunities to make subtle and dangerous mistakes.

If you’re going to be opening and closing them, then just have a std::unique_ptr<Edit> and when you want to replace it, create a new one. That way you can also do it in two steps: safely closing the current edit after removing any listeners and other UI you may have attached to it, and then opening the new one and reattaching to it.