summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bf19a06)
trim trailing white spaces of names at publishing in study
//================================================================================
/*!
//================================================================================
/*!
- * \brief Install
- *
- *
+ * \brief Install filters
*/
//================================================================================
*/
//================================================================================
{
_PTR(SObject) obj = _study->studyDS()->FindObjectID( anIt.Value()->getEntry() );
if( obj )
{
_PTR(SObject) obj = _study->studyDS()->FindObjectID( anIt.Value()->getEntry() );
if( obj )
- names.append( obj->GetName().c_str() );
+ names.append( QString( obj->GetName().c_str() ).trimmed() );
#include <TCollection_AsciiString.hxx>
#include <TopoDS_Solid.hxx>
#include <TCollection_AsciiString.hxx>
#include <TopoDS_Solid.hxx>
#ifdef _DEBUG_
static int MYDEBUG = 0;
//static int VARIABLE_DEBUG = 0;
#ifdef _DEBUG_
static int MYDEBUG = 0;
//static int VARIABLE_DEBUG = 0;
SALOMEDS::GenericAttribute_wrap anAttr =
aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" );
SALOMEDS::AttributeName_wrap aNameAttr = anAttr;
SALOMEDS::GenericAttribute_wrap anAttr =
aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" );
SALOMEDS::AttributeName_wrap aNameAttr = anAttr;
- if ( theName && strlen( theName ) != 0 )
- aNameAttr->SetValue( theName );
- else {
+ if ( theName && theName[0] ) {
+ std::string name( theName ); // trim trailing white spaces
+ for ( size_t i = name.size()-1; i > 0; --i )
+ if ( isspace( name[i] )) name[i] = '\0';
+ else break;
+ aNameAttr->SetValue( name.c_str() );
+ }
+ else
+ {
CORBA::String_var curName = aNameAttr->Value();
if ( strlen( curName.in() ) == 0 ) {
SMESH_Comment aName(theDefaultName);
CORBA::String_var curName = aNameAttr->Value();
if ( strlen( curName.in() ) == 0 ) {
SMESH_Comment aName(theDefaultName);
//=======================================================================
//function : SetPixMap
//=======================================================================
//function : SetPixMap
//=======================================================================
void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject,
//=======================================================================
void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject,