PAL18573: geometric entities are created with incorrect name

This commit is contained in:
asl 2008-03-24 08:04:32 +00:00
parent 834cb7fe6f
commit d2ac54f583
10 changed files with 14 additions and 14 deletions

View File

@ -476,7 +476,7 @@ GEOM::GEOM_Object_ptr BlocksGUI_ExplodeDlg::getFather( GEOM::GEOM_Object_ptr )
// Function : getNewObjectName // Function : getNewObjectName
// Purpose : Redefine this method to return proper name for a new object // Purpose : Redefine this method to return proper name for a new object
//================================================================ //================================================================
const char* BlocksGUI_ExplodeDlg::getNewObjectName() const QString BlocksGUI_ExplodeDlg::getNewObjectName() const
{ {
return ""; return QString::null;
} }

View File

@ -48,7 +48,7 @@ protected:
virtual bool execute( ObjectList& ); virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr ); virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
virtual const char* getNewObjectName() const; virtual QString getNewObjectName() const;
private: private:
void Init(); void Init();

View File

@ -597,7 +597,7 @@ GEOM::GEOM_Object_ptr EntityGUI_SubShapeDlg::getFather( GEOM::GEOM_Object_ptr )
return myObject; return myObject;
} }
const char* EntityGUI_SubShapeDlg::getNewObjectName() const QString EntityGUI_SubShapeDlg::getNewObjectName() const
{ {
return ""; return QString::null;
} }

View File

@ -48,7 +48,7 @@ protected:
virtual bool isValid( QString& ); virtual bool isValid( QString& );
virtual bool execute( ObjectList& ); virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr ); virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
virtual const char* getNewObjectName() const; virtual QString getNewObjectName() const;
private slots: private slots:
void ClickOnOk(); void ClickOnOk();

View File

@ -902,9 +902,9 @@ GEOM::GEOM_Object_ptr GEOMBase_Helper::getFather( GEOM::GEOM_Object_ptr theObj )
// Function : getNewObjectName // Function : getNewObjectName
// Purpose : Redefine this method to return proper name for a new object // Purpose : Redefine this method to return proper name for a new object
//================================================================ //================================================================
const char* GEOMBase_Helper::getNewObjectName() const QString GEOMBase_Helper::getNewObjectName() const
{ {
return ""; return QString::null;
} }
//================================================================ //================================================================

View File

@ -171,7 +171,7 @@ protected:
// for <theObj> or a nil reference if <theObj> should be published // for <theObj> or a nil reference if <theObj> should be published
// as a top-level object. // as a top-level object.
virtual const char* getNewObjectName() const; virtual QString getNewObjectName() const;
virtual void addSubshapesToStudy(); virtual void addSubshapesToStudy();
GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, const QString& theName ); GEOM::GEOM_Object_ptr findObjectInFather( GEOM::GEOM_Object_ptr theFather, const QString& theName );

View File

@ -224,9 +224,9 @@ void GEOMBase_Skeleton::initName( const QString& thePrefix )
// function : getNewObjectName() // function : getNewObjectName()
// purpose : returns contents of Name field // purpose : returns contents of Name field
//================================================================================= //=================================================================================
const char* GEOMBase_Skeleton::getNewObjectName() const QString GEOMBase_Skeleton::getNewObjectName() const
{ {
return myMainFrame->ResultName->text().toLatin1().constData(); return myMainFrame->ResultName->text();
} }
//================================================================================= //=================================================================================

View File

@ -70,7 +70,7 @@ protected:
/*! returns contents of "Name" field /*! returns contents of "Name" field
*/ */
virtual const char* getNewObjectName() const; virtual QString getNewObjectName() const;
/*! returns id of a selected "constructor" radio button or '-1' in case of error /*! returns id of a selected "constructor" radio button or '-1' in case of error
*/ */

View File

@ -774,7 +774,7 @@ bool GroupGUI_GroupDlg::execute( ObjectList& objects )
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) ); _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
if ( SO ) { if ( SO ) {
_PTR(StudyBuilder) aBuilder (study->studyDS()->NewBuilder()); _PTR(StudyBuilder) aBuilder (study->studyDS()->NewBuilder());
aBuilder->SetName( SO, getNewObjectName() ); aBuilder->SetName( SO, getNewObjectName().toLatin1().constData() );
} }
} }
} }

View File

@ -531,7 +531,7 @@ bool RepairGUI_GlueDlg::onAcceptLocal()
for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) {
QString aName( "" ); QString aName( "" );
if ( nbObjs > 1 ) { if ( nbObjs > 1 ) {
aName = strlen( getNewObjectName() ) ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) ); aName = getNewObjectName().length() ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
} }
else { else {
aName = getNewObjectName(); aName = getNewObjectName();