Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch import format default back to CJSON if found #1707

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading