From 44fba8006818f954a3e30a8e2a29f0060e551662 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sat, 20 Feb 2016 12:21:49 +0300 Subject: [PATCH] fix #14 The code's operational logic does not correspond with its formatting. The statement is indented to the right, but it is always executed. It is possible that curly brackets are missing. lrcolorpropitem.cpp 69 --- src/objectinspector/propertyItems/lrcolorpropitem.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/objectinspector/propertyItems/lrcolorpropitem.cpp b/src/objectinspector/propertyItems/lrcolorpropitem.cpp index 15dd8ee..7880442 100644 --- a/src/objectinspector/propertyItems/lrcolorpropitem.cpp +++ b/src/objectinspector/propertyItems/lrcolorpropitem.cpp @@ -61,12 +61,13 @@ bool ColorPropItem::paint(QPainter *painter, const QStyleOptionViewItemV4 &optio QPen pen; if (option.state & QStyle::State_Selected){ - pen.setColor(option.palette.brightText().color()); pen.setWidth(2); - painter->setPen(pen); - }else + pen.setColor(option.palette.brightText().color()); + }else { pen.setColor(Qt::gray); - painter->setPen(pen); + } + + painter->setPen(pen); painter->setBrush(propertyValue().value()); QRect rect = option.rect.adjusted(4,4,-4,-6);