From 7e4e6684c613955a4ac3a334f9228cce5bac4491 Mon Sep 17 00:00:00 2001 From: turbineyan Date: Sun, 27 Dec 2020 18:51:03 +0800 Subject: [PATCH] to fix the crash issue. due to extractAcceptableValue() function was return an empty list --- limereport/items/lralignpropitem.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/limereport/items/lralignpropitem.cpp b/limereport/items/lralignpropitem.cpp index a91c243..990b9ec 100644 --- a/limereport/items/lralignpropitem.cpp +++ b/limereport/items/lralignpropitem.cpp @@ -32,6 +32,8 @@ #include "objectinspector/editors/lrcomboboxeditor.h" #include "lrtextitem.h" +#include + namespace{ LimeReport::ObjectPropItem * createAlignItem( QObject *object, LimeReport::ObjectPropItem::ObjectsList* objects, const QString& name, const QString& displayName, const QVariant& data, LimeReport::ObjectPropItem* parent, bool readonly @@ -160,7 +162,12 @@ QString AlignmentItemEditor::displayValue() const void AlignmentItemEditor::setPropertyValue(QVariant value) { - ObjectPropItem::setPropertyValue(extractAcceptableValue(value.toInt())[0]); + //ObjectPropItem::setPropertyValue(extractAcceptableValue(value.toInt())[0]); + qDebug()<<"value "< _accpepttableValueList= extractAcceptableValue(value.toInt()); + if(_accpepttableValueList.isEmpty()) return; + + ObjectPropItem::setPropertyValue(_accpepttableValueList[0]); } }