From 6ff055efb0eef5d4cc80a90d8c6f76c45b5c4262 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 10 Jul 2018 21:59:12 +0300 Subject: [PATCH] Font editor fixed --- common.pri | 2 +- .../objectinspector/propertyItems/lrfontpropitem.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common.pri b/common.pri index 0e2ae3e..2dd4cb2 100644 --- a/common.pri +++ b/common.pri @@ -62,7 +62,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 83 +LIMEREPORT_VERSION_RELEASE = 85 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/objectinspector/propertyItems/lrfontpropitem.cpp b/limereport/objectinspector/propertyItems/lrfontpropitem.cpp index 1c8b506..3e14fea 100644 --- a/limereport/objectinspector/propertyItems/lrfontpropitem.cpp +++ b/limereport/objectinspector/propertyItems/lrfontpropitem.cpp @@ -82,7 +82,14 @@ void FontPropItem::setPropertyEditorData(QWidget* propertyEditor, const QModelIn void FontPropItem::setModelData(QWidget* propertyEditor, QAbstractItemModel* model, const QModelIndex &index) { - model->setData(index,qobject_cast(propertyEditor)->fontValue()); + + QFont tmpFont = qobject_cast(propertyEditor)->fontValue(); + QFont font(tmpFont.family()); + font.setBold(tmpFont.bold()); + font.setPointSize(tmpFont.pointSize()); + font.setItalic(tmpFont.italic()); + font.setUnderline(tmpFont.underline()); + model->setData(index,font); setValueToObject(propertyName(),propertyValue()); }