From 6d2a88e85ff98337b6fd74b8a7d8c8ae2ab63c18 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Tue, 6 Oct 2020 12:48:39 +0200 Subject: [PATCH] use default value if the parameter is not available --- sources/titleblockproperties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/titleblockproperties.cpp b/sources/titleblockproperties.cpp index c27339e2b..4f60b2668 100644 --- a/sources/titleblockproperties.cpp +++ b/sources/titleblockproperties.cpp @@ -122,8 +122,8 @@ bool TitleBlockProperties::fromXml(const QDomElement &e) { setDateFromString(date); QString display_at_temp; - propertyString(e, "displayAt", &display_at_temp); - display_at = (display_at_temp == "bottom" ? Qt::BottomEdge : Qt::RightEdge); + if (propertyString(e, "displayAt", &display_at_temp) == PropertyFlags::Success) + display_at = (display_at_temp == "bottom" ? Qt::BottomEdge : Qt::RightEdge); // otherwise it gets default in header file // reads the template used to render the title block if (propertyString(e, "titleblocktemplate", &template_name)) {