Changeset View
Changeset View
Standalone View
Standalone View
src/tools/moleculeview.cpp
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Line(s) | 162 | { | |||
---|---|---|---|---|---|
166 | 166 | | |||
167 | // 1. workaround for missing copy-constructor: fixed in Avogadro2 > 0.9 | 167 | // 1. workaround for missing copy-constructor: fixed in Avogadro2 > 0.9 | ||
168 | // 2. another workaround for broken copy-constructor that does not | 168 | // 2. another workaround for broken copy-constructor that does not | ||
169 | // initialize the m_undoMolecule private member variable; | 169 | // initialize the m_undoMolecule private member variable; | ||
170 | // this molecule should be created on the heap instead of the stack | 170 | // this molecule should be created on the heap instead of the stack | ||
171 | m_molecule = *IoWrapper::readMolecule(filename); | 171 | m_molecule = *IoWrapper::readMolecule(filename); | ||
172 | 172 | | |||
173 | if (m_molecule.atomCount() != 0) { | 173 | if (m_molecule.atomCount() != 0) { | ||
174 | disconnect(ui.glWidget->molecule(), 0, this, 0); | 174 | disconnect(ui.glWidget->molecule(), nullptr, this, nullptr); | ||
pino: unrelated change | |||||
175 | ui.glWidget->setMolecule(&m_molecule); | 175 | ui.glWidget->setMolecule(&m_molecule); | ||
176 | ui.glWidget->update(); | 176 | ui.glWidget->update(); | ||
177 | slotUpdateStatistics(); | 177 | slotUpdateStatistics(); | ||
178 | connect(&m_molecule, &Avogadro::QtGui::Molecule::changed, | 178 | connect(&m_molecule, &Avogadro::QtGui::Molecule::changed, | ||
179 | this, &MoleculeDialog::slotUpdateStatistics); | 179 | this, &MoleculeDialog::slotUpdateStatistics); | ||
180 | } | 180 | } | ||
181 | ui.glWidget->resetCamera(); | 181 | ui.glWidget->resetCamera(); | ||
182 | ui.glWidget->updateScene(); | 182 | ui.glWidget->updateScene(); | ||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
unrelated change