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
// 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 GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
virtual const char* getNewObjectName() const;
virtual QString getNewObjectName() const;
private:
void Init();

View File

@ -597,7 +597,7 @@ GEOM::GEOM_Object_ptr EntityGUI_SubShapeDlg::getFather( GEOM::GEOM_Object_ptr )
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 execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
virtual const char* getNewObjectName() const;
virtual QString getNewObjectName() const;
private slots:
void ClickOnOk();

View File

@ -902,9 +902,9 @@ GEOM::GEOM_Object_ptr GEOMBase_Helper::getFather( GEOM::GEOM_Object_ptr theObj )
// Function : getNewObjectName
// 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
// as a top-level object.
virtual const char* getNewObjectName() const;
virtual QString getNewObjectName() const;
virtual void addSubshapesToStudy();
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()
// 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
*/
virtual const char* getNewObjectName() const;
virtual QString getNewObjectName() const;
/*! 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 ) );
if ( SO ) {
_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 ) {
QString aName( "" );
if ( nbObjs > 1 ) {
aName = strlen( getNewObjectName() ) ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
aName = getNewObjectName().length() ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) );
}
else {
aName = getNewObjectName();