Merge branch 'master' into 1.4

This commit is contained in:
Arin Alexander
2016-11-01 14:56:18 +03:00
9 changed files with 75 additions and 20 deletions

View File

@@ -109,7 +109,8 @@ void AlignmentItemEditor::setModelData(QWidget *propertyEditor, QAbstractItemMod
int align = m_acceptableValues.value(qobject_cast<ComboBoxEditor*>(propertyEditor)->text());
flags=clearAcceptableValues(flags) | align;
object()->setProperty(propertyName().toLatin1(),flags);
foreach(QObject* item,*objects()){item->setProperty(propertyName().toLatin1(),flags);}
if (objects())
foreach(QObject* item,*objects()){item->setProperty(propertyName().toLatin1(),flags);}
parent()->setPropertyValue(flags);
model->setData(index,align);
}

View File

@@ -60,6 +60,18 @@ TextItem::TextItem(QObject *owner, QGraphicsItem *parent)
m_allowHTMLInFields(false)
{
m_text = new QTextDocument();
PageItemDesignIntf* pageItem = dynamic_cast<PageItemDesignIntf*>(parent);
BaseDesignIntf* parentItem = dynamic_cast<BaseDesignIntf*>(parent);
while (!pageItem){
parentItem = dynamic_cast<BaseDesignIntf*>(parentItem->parentItem());
pageItem = dynamic_cast<PageItemDesignIntf*>(parentItem);
}
if (pageItem){
QFont defaultFont = pageItem->font();
setFont(defaultFont);
}
Init();
}