diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp index 091b6149b8..2ac08de09f 100644 --- a/src/insets/InsetExternal.cpp +++ b/src/insets/InsetExternal.cpp @@ -59,7 +59,7 @@ lyx::external::DisplayType const defaultDisplayType = lyx::external::NoDisplay; unsigned int const defaultLyxScale = 100; -string defaultTemplateName = "RasterImage"; +string defaultTemplateName; } // namespace anon @@ -132,9 +132,15 @@ Translator const & displayTranslator() InsetExternalParams::InsetExternalParams() : display(defaultDisplayType), lyxscale(defaultLyxScale), - draft(false), - templatename_(defaultTemplateName) -{} + draft(false) +{ + if (defaultTemplateName.empty()) { + external::TemplateManager const & etm = + external::TemplateManager::get(); + templatename_ = etm.getTemplates().begin()->first; + } else + templatename_ = defaultTemplateName; +} namespace {