void Crystal::scaleVolume() { if (!m_molecule->unitCell()) return; VolumeScalingDialog dlg; dlg.setCurrentVolume(m_molecule->unitCell()->volume()); int reply = dlg.exec(); if (reply != QDialog::Accepted) return; CrystalTools::setVolume(*m_molecule, dlg.newVolume(), dlg.transformAtoms() ? CrystalTools::TransformAtoms : CrystalTools::None); m_molecule->emitChanged(Molecule::Modified | Molecule::UnitCell | (dlg.transformAtoms() ? Molecule::Atoms : Molecule::NoChange)); }
void Crystal::scaleVolume() { if (!m_molecule->unitCell()) return; VolumeScalingDialog dlg; dlg.setCurrentVolume(m_molecule->unitCell()->volume()); int reply = dlg.exec(); if (reply != QDialog::Accepted) return; m_molecule->undoMolecule()->setCellVolume( dlg.newVolume(), dlg.transformAtoms() ? CrystalTools::TransformAtoms : CrystalTools::None); }