Commit 9b1fe339 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr

Use existing API.

Previous code required a still unmerge pull request.
parent ee89aa4a
......@@ -172,9 +172,8 @@ void MoleculeDialog::loadMolecule(const QString &filename)
qDebug() << "Filename to load: " << filename;
auto tmpMol = IoWrapper::readMolecule(filename);
auto molecule = new Avogadro::QtGui::Molecule(*tmpMol);
delete tmpMol;
Avogadro::QtGui::Molecule tmpMol = *IoWrapper::readMolecule(filename);
auto molecule = new Avogadro::QtGui::Molecule(tmpMol);
// Check that a valid molecule object was returned
if (!molecule) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment