]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Using run-time type info for compare of Data Owners
authorabd <abd@opencascade.com>
Mon, 4 Sep 2006 09:01:43 +0000 (09:01 +0000)
committerabd <abd@opencascade.com>
Mon, 4 Sep 2006 09:01:43 +0000 (09:01 +0000)
src/SUIT/SUIT_DataOwner.cxx

index beb907d7a636ff71082653cc1ff98a43f45dff9b..3090afa912595ff0bc05c8f9bce1846b0ed69fa0 100755 (executable)
@@ -55,7 +55,16 @@ bool operator<( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 )
   else if ( p2.isNull() )
     return false;
 
-  return p1->isLess( *p2 );
+  //bug with acrossentry of DataOwner and DataSubOwner
+  const _typeinfo& ti1 = typeid( *(p1.operator->()) );
+  const _typeinfo& ti2 = typeid( *(p2.operator->()) );
+
+  int res = strcmp( ti1.name(), ti2.name() );
+
+  if ( !res )
+    return p1->isLess( *p2 );
+
+  return res;
 }
 
 /*!