From 356be1a882582ecd28188f397cbe695f5e390875 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Tue, 10 Sep 2024 17:28:18 -0400 Subject: [PATCH] Switch default back to CJSON if found Signed-off-by: Geoff Hutchison --- avogadro/qtplugins/openbabel/openbabel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/avogadro/qtplugins/openbabel/openbabel.cpp b/avogadro/qtplugins/openbabel/openbabel.cpp index 68b6eb3893..53cd789ceb 100644 --- a/avogadro/qtplugins/openbabel/openbabel.cpp +++ b/avogadro/qtplugins/openbabel/openbabel.cpp @@ -260,15 +260,15 @@ void OpenBabel::handleReadFormatUpdate(const QMultiMap& 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(); } }