Template updates + small fixes

This commit is contained in:
parax0
2016-01-25 23:12:22 -07:00
parent 75091f718c
commit c91c275af7
23 changed files with 108 additions and 24 deletions

View File

@@ -285,7 +285,8 @@ QVariant CPropertyModel::data(const QModelIndex& rkIndex, int Role) const
if (!(rkIndex.internalId() & 0x1))
{
IProperty *pProp = PropertyForIndex(rkIndex, false);
QString Text = QString("<b>%1</b> <i>(%2)</i>").arg(TO_QSTRING(pProp->Name())).arg(TO_QSTRING(PropEnumToPropString(pProp->Type())));
QString DisplayText = data(rkIndex, Qt::DisplayRole).toString();
QString Text = QString("<b>%1</b> <i>(%2)</i>").arg(DisplayText).arg(TO_QSTRING(PropEnumToPropString(pProp->Type())));
TString Desc = pProp->Template()->Description();
if (!Desc.IsEmpty()) Text += "<br/>" + TO_QSTRING(Desc);
return Text;

View File

@@ -86,7 +86,10 @@ QColor WColorPicker::getColor()
void WColorPicker::setColor(QColor Color)
{
mColor = Color;
emit colorChanged(mColor);
update();
if (mColor != Color)
{
mColor = Color;
emit colorChanged(mColor);
update();
}
}