Commit ac81d6b1 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Make compatible with latest Avogadro2 release

parent 297d641f
......@@ -94,9 +94,11 @@ KalziumGLWidget::~KalziumGLWidget()
bool KalziumGLWidget::openFile(const QString &file)
{
auto tmpMol = IoWrapper::readMolecule(file);
auto mol = new Avogadro::QtGui::Molecule(*tmpMol);
delete tmpMol;
// workaround for missing copy-constructor: fixed in Avogadra2 > 0.9
Avogadro::QtGui::Molecule temp;
temp = *IoWrapper::readMolecule(file);
auto mol = new Avogadro::QtGui::Molecule(temp);
if (!mol) {
return false;
}
......
......@@ -171,7 +171,9 @@ void MoleculeDialog::loadMolecule(const QString &filename)
qDebug() << "Filename to load: " << filename;
Avogadro::QtGui::Molecule tmpMol = *IoWrapper::readMolecule(filename);
// workaround for missing copy-constructor: fixed in Avogadra2 > 0.9
Avogadro::QtGui::Molecule tmpMol;
tmpMol = *IoWrapper::readMolecule(filename);
auto molecule = new Avogadro::QtGui::Molecule(tmpMol);
// Check that a valid molecule object was returned
......
Supports Markdown
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