From 6efd79861f2de3608bbe32c6d969dfa505e86f0a Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 26 Aug 2005 08:10:26 +0000 Subject: [PATCH] Fix for problem: broken reference objects after delete originals. --- src/SalomeApp/SalomeApp_Application.cxx | 2 +- src/SalomeApp/SalomeApp_DataObject.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 1dcf08d22..fa0d6a156 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1993,7 +1993,7 @@ void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* t if ( it.Value()->hasEntry() ) { _PTR(SObject) aSObject = aStudyDS->FindObjectID( it.Value()->getEntry() ); - if ( aSObject->ReferencedObject(anObj) == false || !QString(anObj->GetIOR().c_str()).isEmpty() ) + if ( aSObject->ReferencedObject(anObj) == false || !QString(anObj->GetName()).isEmpty() ) isInvalidRefs = false; } } diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index d04114d3e..63f39cc61 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -114,7 +114,7 @@ QString SalomeApp_DataObject::name() const if ( isReference() ) { - if ( !(text(CT_IOR).isEmpty()) ) + if ( !(QString(referencedObject()->GetName()).isEmpty()) ) str = QString( "* " ) + str; else str = QString( "" ); @@ -187,7 +187,7 @@ QColor SalomeApp_DataObject::color( const ColorRole cr ) const case Text: if ( isReference() ) { - if ( !(text(CT_IOR).isEmpty()) ) + if ( !(QString(referencedObject()->GetName()).isEmpty()) ) clr = QColor( 255, 0, 0 ); else clr = QColor( 200, 200, 200 ); @@ -205,7 +205,7 @@ QColor SalomeApp_DataObject::color( const ColorRole cr ) const case Highlight: if ( isReference() ) { - if ( !(text(CT_IOR).isEmpty()) ) + if ( !(QString(referencedObject()->GetName()).isEmpty()) ) clr = QColor( 255, 0, 0 ); else clr = QColor( 200, 200, 200 ); -- 2.39.2