diff --git a/src/Mod/TechDraw/Gui/QGCustomText.cpp b/src/Mod/TechDraw/Gui/QGCustomText.cpp index 895ec1c509..016c4db2cf 100644 --- a/src/Mod/TechDraw/Gui/QGCustomText.cpp +++ b/src/Mod/TechDraw/Gui/QGCustomText.cpp @@ -43,15 +43,14 @@ using namespace TechDraw; using namespace TechDrawGui; QGCustomText::QGCustomText(QGraphicsItem* parent) : - QGraphicsTextItem(parent), isHighlighted(false) + QGraphicsTextItem(parent) { setCacheMode(QGraphicsItem::NoCache); setAcceptHoverEvents(false); setFlag(QGraphicsItem::ItemIsSelectable, false); setFlag(QGraphicsItem::ItemIsMovable, false); - m_colCurrent = getNormalColor(); - m_colNormal = m_colCurrent; + m_colNormal = getNormalColor(); tightBounding = false; } @@ -144,27 +143,23 @@ void QGCustomText::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) } void QGCustomText::setPrettyNormal() { - m_colCurrent = m_colNormal; - setDefaultTextColor(m_colCurrent); + setDefaultTextColor(m_colNormal); update(); } void QGCustomText::setPrettyPre() { - m_colCurrent = getPreColor(); - setDefaultTextColor(m_colCurrent); + setDefaultTextColor(getPreColor()); update(); } void QGCustomText::setPrettySel() { - m_colCurrent = getSelectColor(); - setDefaultTextColor(m_colCurrent); + setDefaultTextColor(getSelectColor()); update(); } void QGCustomText::setColor(QColor c) { m_colNormal = c; - m_colCurrent = c; QGraphicsTextItem::setDefaultTextColor(c); } diff --git a/src/Mod/TechDraw/Gui/QGCustomText.h b/src/Mod/TechDraw/Gui/QGCustomText.h index ee08faccd4..d8ed0d0cee 100644 --- a/src/Mod/TechDraw/Gui/QGCustomText.h +++ b/src/Mod/TechDraw/Gui/QGCustomText.h @@ -87,9 +87,7 @@ protected: Base::Reference getParmGroup(); - bool isHighlighted; bool tightBounding; // Option to use tighter boundingRect(), works only for plaintext QGCustomText - QColor m_colCurrent; QColor m_colNormal; private: