From 2924ab4e1a2e5a572c9ba94a689b29f7caf99d1d Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 7 Jun 2005 09:16:46 +0000 Subject: [PATCH] Object browser reference text color was corrected. --- src/SalomeApp/SalomeApp_DataObject.cxx | 18 ++++-------------- src/SalomeApp/SalomeApp_DataObject.h | 1 - 2 files changed, 4 insertions(+), 15 deletions(-) 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; -- 2.39.2