From: stv Date: Tue, 7 Jun 2005 09:16:46 +0000 (+0000) Subject: Object browser reference text color was corrected. X-Git-Tag: T3_0_0_a2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2924ab4e1a2e5a572c9ba94a689b29f7caf99d1d;p=modules%2Fgui.git Object browser reference text color was corrected. --- diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index e1937ceb9..e7a922be8 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -125,18 +125,6 @@ QPixmap SalomeApp_DataObject::icon() const return QPixmap(); } -QColor SalomeApp_DataObject::color() const -{ - _PTR(GenericAttribute) anAttr; - if ( myObject && myObject->FindAttribute( anAttr, "AttributeTextColor" ) ) - { - _PTR(AttributeTextColor) aColAttr( anAttr ); - QColor color( (int)aColAttr->TextColor().R, (int)aColAttr->TextColor().G, (int)aColAttr->TextColor().B ); - return color; - } - return QColor(); -} - QString SalomeApp_DataObject::text( const int id ) const { QString txt; @@ -165,8 +153,10 @@ QColor SalomeApp_DataObject::color( const ColorRole cr ) const QColor clr; switch ( cr ) { - case Foreground: - if ( myObject ) + case Text: + if ( isReference() ) + clr = QColor( 255, 0, 0 ); + else if ( myObject ) { _PTR(GenericAttribute) anAttr; if ( myObject->FindAttribute( anAttr, "AttributeTextColor" ) ) diff --git a/src/SalomeApp/SalomeApp_DataObject.h b/src/SalomeApp/SalomeApp_DataObject.h index 26ffdfeb4..9077f786d 100644 --- a/src/SalomeApp/SalomeApp_DataObject.h +++ b/src/SalomeApp/SalomeApp_DataObject.h @@ -24,7 +24,6 @@ public: virtual QString name() const; virtual QPixmap icon() const; - virtual QColor color() const; virtual QString toolTip() const; virtual QString text( const int ) const;