Skip to content

Commit

Permalink
Use readProperties from scripts
Browse files Browse the repository at this point in the history
Doesn't completely work, since extensions need to know

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Nov 27, 2023
1 parent 01a1413 commit baafcc3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions avogadro/qtgui/interfacescript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,12 @@ bool InterfaceScript::processCommand(Core::Molecule* mol)
newMol.perceiveBondOrders();
}

// just append some new bits
if (obj["append"].toBool()) {
// how do we handle this result?
if (obj["readProperties"].toBool()) {
qDebug() << " reading properties";
guiMol->readProperties(newMol);
guiMol->emitChanged(Molecule::Atoms);
} else if (obj["append"].toBool()) {
guiMol->undoMolecule()->appendMolecule(newMol, m_displayName);
} else { // replace the whole molecule
Molecule::MoleculeChanges changes = (Molecule::Atoms | Molecule::Bonds |
Expand Down

0 comments on commit baafcc3

Please sign in to comment.