mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-06 23:00:34 +05:00
SMESH_Gen_i::Save(...) { ...
+ // PAL17753 (Regresion: missing hypothesis in restored study) + // "lib" also should be removed from the beginning + //if( libname_len > 3 ) + //libname.resize( libname_len - 3 ); + if( libname_len > 6 ) + libname = libname.substr( 3, libname_len - 3 - 3 );
This commit is contained in:
parent
9e1c526b0b
commit
9969477f2e
@ -327,7 +327,9 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
|
|||||||
{
|
{
|
||||||
int libNameLen = strlen(theLibName);
|
int libNameLen = strlen(theLibName);
|
||||||
//check for old format "libXXXXXXX.so"
|
//check for old format "libXXXXXXX.so"
|
||||||
if( libNameLen > 7 && !strncmp( theLibName, "lib", 3 ) && !strcmp( theLibName+libNameLen-3, ".so" ) )
|
if( libNameLen > 7 &&
|
||||||
|
!strncmp( theLibName, "lib", 3 ) &&
|
||||||
|
!strcmp( theLibName+libNameLen-3, ".so" ) )
|
||||||
{
|
{
|
||||||
//the old format
|
//the old format
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
@ -1705,8 +1707,12 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
if( libname_len > 4 )
|
if( libname_len > 4 )
|
||||||
libname.resize( libname_len - 4 );
|
libname.resize( libname_len - 4 );
|
||||||
#else
|
#else
|
||||||
if( libname_len > 3 )
|
// PAL17753 (Regresion: missing hypothesis in restored study)
|
||||||
libname.resize( libname_len - 3 );
|
// "lib" also should be removed from the beginning
|
||||||
|
//if( libname_len > 3 )
|
||||||
|
//libname.resize( libname_len - 3 );
|
||||||
|
if( libname_len > 6 )
|
||||||
|
libname = libname.substr( 3, libname_len - 3 - 3 );
|
||||||
#endif
|
#endif
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
int id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
@ -1770,8 +1776,12 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
if( libname_len > 4 )
|
if( libname_len > 4 )
|
||||||
libname.resize( libname_len - 4 );
|
libname.resize( libname_len - 4 );
|
||||||
#else
|
#else
|
||||||
if( libname_len > 3 )
|
// PAL17753 (Regresion: missing hypothesis in restored study)
|
||||||
libname.resize( libname_len - 3 );
|
// "lib" also should be removed from the beginning
|
||||||
|
//if( libname_len > 3 )
|
||||||
|
//libname.resize( libname_len - 3 );
|
||||||
|
if( libname_len > 6 )
|
||||||
|
libname = libname.substr( 3, libname_len - 3 - 3 );
|
||||||
#endif
|
#endif
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
int id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user