Skip to content

Commit

Permalink
Switch default back to CJSON if found
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Sep 10, 2024
1 parent 96c13db commit 356be1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions avogadro/qtplugins/openbabel/openbabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ void OpenBabel::handleReadFormatUpdate(const QMultiMap<QString, QString>& fmts)
// Emit a signal indicating the file formats are ready if read and write
// formats have both returned their results.
if (!m_readFormatsPending && !m_writeFormatsPending) {
emit fileFormatsReady();

// Update the default format if cjson is available
if (m_readFormats.contains("Chemical JSON") &&
m_writeFormats.contains("Chemical JSON")) {
m_defaultFormat = "cjson";

qDebug() << "Setting default format to cjson.";
qDebug() << "Setting default format to " << m_defaultFormat.c_str();
}

emit fileFormatsReady();
}
}

Expand Down

0 comments on commit 356be1a

Please sign in to comment.