From: mzn Date: Fri, 26 Aug 2005 08:10:26 +0000 (+0000) Subject: Fix for problem: broken reference objects after delete originals. X-Git-Tag: T_3_0_2a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6efd79861f2de3608bbe32c6d969dfa505e86f0a;p=modules%2Fgui.git Fix for problem: broken reference objects after delete originals. --- 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 );