diff --git a/OMEdit/OMEditLIB/Annotations/DynamicAnnotation.cpp b/OMEdit/OMEditLIB/Annotations/DynamicAnnotation.cpp index 72af44823a1..e37bb6af7f9 100644 --- a/OMEdit/OMEditLIB/Annotations/DynamicAnnotation.cpp +++ b/OMEdit/OMEditLIB/Annotations/DynamicAnnotation.cpp @@ -143,8 +143,10 @@ void DynamicAnnotation::evaluate(ModelInstance::Model *pModel) return *exp; })); } catch (const std::exception &e) { - qDebug() << "Failed to evaluate expression."; - qDebug() << e.what(); + if (MainWindow::instance()->isDebug()) { + qDebug() << "Failed to evaluate expression."; + qDebug() << e.what(); + } } } }