diff --git a/avogadro/qtgui/jsonwidget.cpp b/avogadro/qtgui/jsonwidget.cpp index b04e502ee4..237745c235 100644 --- a/avogadro/qtgui/jsonwidget.cpp +++ b/avogadro/qtgui/jsonwidget.cpp @@ -220,7 +220,8 @@ void JsonWidget::buildOptionGui() order = obj.value("order").toInt(); keys.insert(order, it.key()); } else { // object doesn't contain "order" - keys.insert(order++, it.key()); + keys.insert(order, it.key()); + order++; } } else { keys.insert(order++, it.key());